Home 
Search 
Today's Posts 
#1




Crafty Move List
Hi!
I asked a question like this but thought this might be a better way to ask for assistance. Can someone please give me a hint on where in the crafty source code I can find the list of moves that crafty will consider or play? As crafty thinks about a move, I want to find the place in the source code to adjust the move list on the first move it's considering. Is root.c where crafty thinks of the first move? Or is there a function that comes later right before it plays a move(not a real move but a move to consider then it goes deeper in thinking). I want to alter the move list for the first move. Say crafty considers Be7 as the best in the list for the first move. But I want to place all Rook moves first. I am trying to find the place in the code to make this change so that the first move it considers is what I place in the code. I want to reorder the last place before it considers a move but only for the very first move in the list. After that crafty plays and orders like normal. Sorry for this long question. I wasn't certain if I explained it properly. The purpose of this is I am doing some analysis regarding how crafty(or programs in general) scores a move vs depth. Say as crafty thinks one move deeper how much better does the move improve? I know a number of people have done this analysis before(ie programmers for Dark Thought). I want to review this with a slightly different approach. Let's say after 16 moves deep crafty determines move X as the best. How many times does crafty change it's thinking until it reaches the best move? What if crafty had placed this move first in the order? On average would crafty had still taken 16 moves or when will the algorithm recognize as move X as being the best, at how many moves? 13,15,18,20? Move order is quite essential but I want to see on average how many moves difference are there to find the best move when also given the best move placed in the front of the list. Someone probably has done this but I've not read this yet also I want to verify the results for myself. Also this is part of the fun. Please any thoughts are most appreciated. 
#2




Crafty Move List
Christopher wrote:
Hi! I asked a question like this but thought this might be a better way to ask for assistance. Can someone please give me a hint on where in the crafty source code I can find the list of moves that crafty will consider or play? As crafty thinks about a move, I want to find the place in the source code to adjust the move list on the first move it's considering. Is root.c where crafty thinks of the first move? Or is there a function that comes later right before it plays a move(not a real move but a move to consider then it goes deeper in thinking). I want to alter the move list for the first move. Say crafty considers Be7 as the best in the list for the first move. But I want to place all Rook moves first. I am trying to find the place in the code to make this change so that the first move it considers is what I place in the code. I want to reorder the last place before it considers a move but only for the very first move in the list. After that crafty plays and orders like normal. From what I understand of the code there is a function called nextMove which does this. If crafty gets past all of the heuristics then it will call this function to get the moves it tries. I don't know how you could alter this function to make it work differently on the first ply, but you could use it to model a different version that is called by rootSearch. NR 
#3




Crafty Move List
Christopher wrote:
Hi! I asked a question like this but thought this might be a better way to ask for assistance. Can someone please give me a hint on where in the crafty source code I can find the list of moves that crafty will consider or play? The moves at the root are set up in "RootMoveList()" in "root.c". As crafty thinks about a move, I want to find the place in the source code to adjust the move list on the first move it's considering. Is root.c where crafty thinks of the first move? Or is there a function that comes later right before it plays a move(not a real move but a move to consider then it goes deeper in thinking). The move list for the root is built and initially sorted there, yes. Unfortunately, it is resorted in Iterate() (in iterate.c) after each search iteration has completed. I want to alter the move list for the first move. Say crafty considers Be7 as the best in the list for the first move. But I want to place all Rook moves first. I am trying to find the place in the code to make this change so that the first move it considers is what I place in the code. I want to reorder the last place before it considers a move but only for the very first move in the list. After that crafty plays and orders like normal. Sorry for this long question. I wasn't certain if I explained it properly. The purpose of this is I am doing some analysis regarding how crafty(or programs in general) scores a move vs depth. Say as crafty thinks one move deeper how much better does the move improve? I know a number of people have done this analysis before(ie programmers for Dark Thought). I want to review this with a slightly different approach. Let's say after 16 moves deep crafty determines move X as the best. How many times does crafty change it's thinking until it reaches the best move? What if crafty had placed this move first in the order? On average would crafty had still taken 16 moves or when will the algorithm recognize as move X as being the best, at how many moves? 13,15,18,20? Move order is quite essential but I want to see on average how many moves difference are there to find the best move when also given the best move placed in the front of the list. Someone probably has done this but I've not read this yet also I want to verify the results for myself. Also this is part of the fun. Please any thoughts are most appreciated.  Robert Hyatt Computer and Information Sciences University of Alabama at Birmingham (205) 9342213 115A Campbell Hall, UAB Station (205) 9345473 FAX Birmingham, AL 352941170 