1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Rep Power

    File Output / Chess Computer

    If this is a duplicate post, I apologize.

    I'm planning to create a chess computer that will try to solve certain positions. Imagine, for example, that it analyzes only one move ahead. So maybe it figures that queen takes rook is good because it gains a rook. In that case it will record (in a file) that move as: 1 ply, the score, and the move.

    So the easiest way to do that is probably to have all the information stored in a subdirectory. For example a subdirectory could be Nf3-2ply-0.03p where Nf3 is the move, 2 ply is how deep it has been analyzed, 0.03 is the number of pawns the move is worth and p is a flag showing that the move is preferred.

    In order to do this I need to know how to create, delete, and rename directories using C.

    If it is important, I plan on doing this using Linux and gcc. I've worked with C before but never with C++

    Any help would be appreciated.
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    man 2 mkdir
    man 2 rename
    man 2 unlink
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo