April 1st, 2013, 04:53 PM
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.
April 1st, 2013, 05:46 PM
man 2 mkdir
man 2 rename
man 2 unlink
[/code] are essential for python code and Makefiles!