I'm wondering in which file of the project is move validation done,
more particularly if a given move is valid given a specific dice roll.

This is in eval.c. This is a part of the source I don't really understand but GenerateMoves() should be a adequate starting point.

If you want to look at gnubg source, the attached diagram may be useful.

If you are interested in backgammon moves generation in general, not specifically how it is done in gnubg, the following file might be easier to use :
http://cvs.savannah.gnu.org/viewvc/*checkout*/gnubg/gnubg-nn/gnubg/eggmoveg.c

This is from the software used to train gnubg neural nets and I think its author, Joseph Heled posted in this mailing list that its move generation code is simpler and more efficient than what is used in gnubg.

Attachment: gnubg.pdf
Description: Adobe PDF document

_______________________________________________
Bug-gnubg mailing list
Bug-gnubg@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-gnubg

Reply via email to