The chess board isn't recorded as a single state, each spot is a single cell that has its own state. Then the ai could interpret each of the individual states to decide the next move.
You only have to code for a cell's ability to maintain its own state (and movement to/from another cell) and its much easier to manage.
2
u/fiealthyCulture Apr 10 '23
Hold on so how else do chess programs work tho? If not written like this ?