Ashish Schottky wrote:My connect-4 program beats yours 5-0.
Neural networks haven't had much success in board games outside of backgammon. The easiest way to avoid storing all the states is to just store the current state at each ply ie Pe4 on ply 1, Pe5 for black on ply 2. When you reach your maximum depth just score the position and see if this score is better than the current score for this depth. If it isn't then forget the move else store it and the score as your best. Then try the next move after Pe5 (perhaps Pe6) and repeat the process. It's called "min max" and has been used for decades. Nothing but the current moves will be stored so there is no need to manage huge sets of arrays.
Madhan Sundararajan Devaki wrote:Normally in AI related games, Neural Networks are employed to avoid storing game states
Welcome to game programming
Ashish Schottky wrote:but then its going to hard to follow and debug.
There will be the same number of moves whether you generate them all at once via your method or one at a time via this method.
Ashish Schottky wrote:There will be innumerable calls to move generation method.
Just return the next move - imagine storing all the moves in an array as you do at the moment and then just return them one at a time.
Ashish Schottky wrote:,there are captures,enpassant ,castle... so which move to return?
Apart from the fact it's extremely slow
Ashish Schottky wrote:I think that there is nothing wrong with working with huge arrays
I doubt this.
Ashish Schottky wrote:Can ArrayLists change this and make it efficent?