PDA

View Full Version : Chess



small_guy
July 8th, 2009, 04:40 PM
Looking for tutorials on how to create a chess game in Flash Pro 8/AS 2.0

Thanks

Christian Seaborn
seaborn.christian@gmail.com

flyingmonkey456
July 8th, 2009, 07:54 PM
a simple google search found me this link. it's a tutorial on chess ai, i'm assuming that's what you needed.
http://www.aihorizon.com/essays/chessai/intro.htm

if you need to know how to move the pieces, i know how to do that. please do a search before you post on the forums next time.

therobot
July 8th, 2009, 09:11 PM
do you need to know how to do the AI for chess, or just piece movement?

I think doing the ai for chess will be quite difficult if you want to create a computer opponent that is remotely challenging.

TOdorus
July 8th, 2009, 10:26 PM
Like the link from flyingmonkey456 said: look up minimax trees. It stands for minimum and maximum score for a board position. A minimum score would be a loss and a maximum score would be a win. The AI looks through all possible moves in a turn and then for all possible moves following those moves and the moves following those moves and so on. This way it can judge the value of each of the initial moves, by the best moves it can make later on.

The trick in all this is how you evaluate a board position. There are some pretty elaborate scoring systems, you might have to look into that. This varies per game (chess, checkers, reversi, go) as you have to way each gametype differently.

small_guy
July 9th, 2009, 12:57 PM
First, thank you for your responses and thoughts.

I actually did do a Google search but had missed the link

http://www.aihorizon.com/essays/chessai/intro.htm

So thanks for catching my oversight flyingmonkey456.

flyingmonkey456
August 5th, 2009, 05:30 AM
know this forum has been dead for a month, but i have some useful information. i don't believe that link goes over fuzzy logic. the reason why computers beat humans at chess is because humans aren't capable of thinking that far ahead. to bring a computer down to a human's level, give it that limit. make it only able to think up to a certain move. to make it even more human, you could make it consider less and less of it's own and the opponent's moves the further it thinks. this would be a bit difficult, but the way i would do it would be to limit move consideration to pieces that can take it's pieces and pieces that are within a number of moves of taking one of it's pieces and vice versa, depending on how far out it has thought.