You could have an extra costume with sensors out from the corners, so they would be touching the other square. Assuming pieces will be colored differently from squares, try using that as a way to do it. I'm to tired to alabprate more.
Offline
Yeah, I realized that. I kind of had an idea in mind, but maybe someone could help. I have all of the graphics already and they look really cool.
I was thinking of having it check pieces to make sure they are not in danger of getting jumped.
Maybe starting out with a checkers AI isn't the best thing, but it'll be fun trying.
Offline
Your best bet: create a way of storing specific moves as a variable/list. It can be as simple as storing two coordinates.
Let the computer iterate through all its possible moves (legal ones) and choose the one that is most advantageous. Since it can move one piece per turn, you simply iterate through the pieces (whose positions should be stored in lists), check all their possible moves, record the outcome/success of each move.
You'll need a way of "ranking" the status of the game. Something like that is usually based on pieces made vulnerable vs. opponent pieces captured, etc.
At the end of the "checking move" phase, iterate through the list of outcome ranking values and choose the move that the computer has ranked the highest. Then, have the computer execute the appropriate move.
For parts of the game like the opening (is that the right term for Checkers -- I play Chess...), you may have to choose a random move, since most of the rankings will be the same. Or you can pre-program some openings.
Offline
Good luck! I'm also interested in how this project turns out, so I'll keep checking this thread. You might want to look on the internet; there're bound to be articles about this sort of thing, since AI behavior is a big focus of technology today (just think about things like "suggested searches" on Google). To start you out, you might want to read up on the idea of the Game Tree.
Offline
Well since you're talking about checkers...you only stay on black, right? You can base your AI off of an x and y grid, and then translate the grid to the diagonal grid created by the black squares.
Offline
^^ Which may sound hard, but it's not really. Provided the grid you're working with is 8 x 8, as is a standard board, when you add the row and column value of a square, if it's even, you have one type of square. If it's odd, it's the other type. The specific type depends on whether the top lefthand corner is white or black.
Offline