Crafty new/old functions

Discussion of chess software programming and technical issues.

Moderator: Ras

jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Crafty new/old functions

Post by jhaglund »

Hello Readers,

I've been looking at the source of Crafty, and I was wondering about the possibility of position learning. Disabled by default, but make it optional to generate the .lrn/.bin files with it enabled. I really liked this feature. Bob, can you add this back to Crafty? Pretty please?

New searched_moves function().
- cpgn command
- cpgn .rc command
- searched_moves() fuction.

What I would like to generate in data form is all the moves searched from node 1. Parameters could enable the user to only store specified root moves (store only lines starting: E2E4...). or even root+x, x being number of plies from entered line.

cpgn calls searched_moves(); fuction and starts analyze(); or eval();, depending on whichever you choose. Analyze() for file generation, non-games, eval() for file generation during a game on each move.

-Stores all moves from root +plies & or root+x+x
-Writes or reads the data
-Generate data in correction PGN notation format. (ex:cpgn_d2d4.pgn).

Even is it was like:
a2a3
a2a4
b2b3
...
e2e4 e7e6
d2d3 h7h5 a2a3

Opions - cpgn |w|r a|e|FEN|file|filename|m x|x+x (root+x (plies) & stop, root+x+x and stop)
- .rc option
cpgn enable|disable

Examples:

White(1): cpgn w a 3 filename
Will call analyze(); within searched_moves() and write all moves searched root + 3 plies to file.

White(1): cpgn w e 5 filename
Enables searched_moves(); in eval(); and search current position for root+5 plies to file, cpgn_eval_position.pgn.

White(1): cpgn w FEN 3 filename
Read user entered FEN and calls analyze(); stores up to FEN+3 plies into file cpgn_fen.pgn

White(1): cpgn w e2e4 6 cpgn_e2e4.pgn
Creates file cpgn_e2e4.pgn writes file only moves with e2-e4 as root move up to root + 6 plies.

cpgn r cpgn_e2e4.pgn 2 3
Reads file cpgn_e2e4.pgn at root + 2 plies. Calls analyze(); and stores root + 2 + 3 moves only.

cpgn m Nf3 3
Moves Nf3 from position, and call analyze(); stores Nf3(root)+3 plies to file cpgn_nf3-3.pgn.

This fuction could also be used in your search fuction as a means of brute force, by reading external data, and other means of evaluation. There could be many ways to play with this idea.

I am very interested in this idea(s), and hope Bob or somebody could implement this into a beta version of Crafty.

I think it would do great things for chess and Crafty.

Let me know what you think.

Sincerely,
:wink:
Joshua D. Haglund
jhaglund@hotmail.com