I was asked to create a Board Game AI(The game is pretty similar to the checkers). So far I finish a basic implementation of NegaScout with a bitboard and, within 5sec, I can go to 10 half-plies deep. The category of the game lies in EXPTIME-complete. In other word, there are almost more moves than atoms in the entire universe. NegaScout help me to reduce this number but I still need to deal with a big number of possible moves.
My board is already static with do/undo function. But for every new boards configurations I need to generate all allowed moves and it cost a lot time even if my class is simple as :
public class Move
{
private final byte startIndex;
private final byte endIndex;
private byte endPawn;
public Move(final byte start,final byte end){startIndex = start; endIndex = end;}
public final void setEndPawn(byte pawn){endPawn = pawn;}
//OTHER FUNCTIONS.. (ONLY FOR DISPLAY/DEBUG)
}
So I have two questions.
FIRST = Is object pooling (on Move) will improve my performance ?
Second = if(FIRST) then Can you tell me how to implement it?(link & small code sample will be really appreciate!!)