Department of Energy Argonne National Laboratory Office of Science NEWTON's Homepage NEWTON's Homepage
NEWTON, Ask A Scientist!
NEWTON Home Page NEWTON Teachers Visit Our Archives Ask A Question How To Ask A Question Question of the Week Our Expert Scientists Volunteer at NEWTON! Frequently Asked Questions Referencing NEWTON About NEWTON About Ask A Scientist Education At Argonne Artificial Intelligence Programming
Name: Zain S.
Status: Student
Age: 17
Location: N/A
Country: N/A
Date: Around 2001


Question:
How is artificial intelligence programmed? I have don some algorithm work with a computer player for checkers, but all it did was search for good moves. how are computers programmed to actually learn? please give me any good references on this topic as well.



Replies:
Actually, it sounds like you have made a great start. There are many different areas of artificial intelligence, and each area of research has its advantages and disadvantages, and has certain types of problems it does well in solving.

For strategy and classic board games, approaches like you are using are quite common and generally good. A little more advanced approach is to use a decision tree. Basically, at each step all the possible moves are evaluated, and then the best move is selected. Then the algorithm simulates the best move for the opponent, and so on until a given depth is reached, and then the path is evaluated. It is called a decision tree because from each move, a lot of next moves branch out. After all the moves have been searched, the next move along the best path is choosen and played.

To make the machine learn, the moves are recorded, and then when the game is over, it goes back and updates each move with whether the game was won or lost by making that move.

For example, in a game of tic-tac-toe, you could do this by having a number for each board position and possible next move. At first everything would be set to zero. When the computer wanted to make a next move, it would find the current board position and look at the numbers for each next move. Then the computer would pick the highest number or randomly choose from those that are the same and move there. It would also store the board position and move. At the end of the game, if it was lost, the computer would subtract one from each move it made, or if it was won, would add one to each move. The next time it played, it would tend to not make losing moves, and tend to make winning ones.

Games typically use a strategy for searching for the best moves, like a decision tree, or simulation rather than a decision at all. For example in StarCraft, each little character has a fixed set of rules that it will follow and control how it behaves, and has no real intelligence at all, and is simply ran as a simulation. The AI players, on the other hand have to make decisions about what to do with their characters, and come up with a strategy to beat the human players.

There are many different types of Artificial Intelligence algorithms, including expert systems, neural networks, fuzzy logic and more.

An introduction to artificial intelligence can be found on the web at:
http://ai.about.com/compute/ai/library/weekly/aa051899.htm

More stuff can be found on the same site at:
http://ai.about.com/compute/ai/

This site has a few good articles and links to a lot more articles.
I hope this helps,
Eric Tolman


Click here to return to the Computer Science Archives

NEWTON is an electronic community for Science, Math, and Computer Science K-12 Educators, sponsored and operated by Argonne National Laboratory's Educational Programs, Andrew Skipor, Ph.D., Head of Educational Programs.

For assistance with NEWTON contact a System Operator (help@newton.dep.anl.gov), or at Argonne's Educational Programs

NEWTON AND ASK A SCIENTIST
Educational Programs
Building 360
9700 S. Cass Ave.
Argonne, Illinois
60439-4845, USA
Update: June 2012
Weclome To Newton

Argonne National Laboratory