Saturday, 30 November 2013

Uh oh.

I've run into the hardest part of checkers: the recursion. I understand backtracking algorithms and how it works, and I can see how it applies to Checkers, but I don't know how it would apply to the other user. In other words, I know how I can do it for the computer playing, but in order to judge how well the user move is, that, I'm not to sure yet.

For one, I do know that I need to make a two dimensional array rather than one long one dimensional array because I'm going to have to change the coordinates constantly.

As Ryk suggested, the -1 could represent that after a move, where the computer would be at a disadvantage because the player could move the pawn and eat it.

A 0 could represent one possible jump.

And just like the backtracking maze, that's a similar outcome.

I'm still not too sure how to find out whether the user is going to eat the computer if I move to a certain spot.

No comments:

Post a Comment