I bet most of you in here have seen the old movie "Wargames"
Im wondering how would you go about programming an AI like WOPR that learns from itself?
Lets take an example in chess *Which he loved* He would make simulations of a chess game, if he lost he would learn from the mistake and improve from that the next time.
Wargames WOPR AI?
Started by resell4, Mar 14 2012 04:42 PM
1 reply to this topic
#1
Posted 14 March 2012 - 04:42 PM
"Things should be made as simple as possible, but not any simpler"
-Albert Einstein
-Albert Einstein
#2
Posted 16 March 2012 - 10:41 AM
Read up on genetic algorithms
In principle you can view the simulation as something like this.
Create an evaluation function for each move.
Play the game using a search algorithm using the evaluation function to pick the best move
Evaluate the results
Then you have to come up with a new evaluation function.
Typically you generate N random evaluation functions, run them all, pick some of the best ones and "breed" them together to create another N evaluation functions, rinse and repeat.
The breed phase is the interesting bit of code for me.
In principle you can view the simulation as something like this.
Create an evaluation function for each move.
Play the game using a search algorithm using the evaluation function to pick the best move
Evaluate the results
Then you have to come up with a new evaluation function.
Typically you generate N random evaluation functions, run them all, pick some of the best ones and "breed" them together to create another N evaluation functions, rinse and repeat.
The breed phase is the interesting bit of code for me.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











