This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Gevater_Tod4711 presents ...


Adaptive Artificial Intelligence - Tic Tac Toe

This Tic Tac Toe game contains a special Artifical Intelligence. The computer first plays realy badly because he doesn't even know how to play Tic Tac Toe.
The computer first only knows that he has to place a gamestone somewhere in the field (where no other gamestone already is placed) and he's able to check whether the game is over because someone wins.

The trick is that the artifical intelligence is able to learn the game while playing.
Every turn is remembered and can be evaluated.

So the more games you play the better the AI will get.

Because it would take very long to play some thousends of games the computer is able to simulate games. He's playing aginst himselves.
Also it's possible to play with two players. This values are also remembered so the computer also learns when you are playing against another person.

Unfortunatly the AI only is able to learn when the data the computer works out can be saved into a file. So the real AI only works when you download this game and play offline.
When you play online the computer isn't able to store the data and everytime you reset the game the whole data is lost.

Because the simulation of thousends of games takes some time I placed some AI's in the folder 'AI Data'. You'll find it when you download this game. In the folders you find some AI files. When you copy them and place them into the scenario folder this file will be the AI. So you can either have a beginner AI, an advanced one or a professional where it's realy hard to win.

I hope you'll enjoy the game.

4356 views / 301 in the last 7 days

1 vote | 0 in the last 7 days

Tags: game simulation demo with-source ai

This scenario is a member of: Game AI, Anti-Arcade

open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

A new version of this scenario was uploaded on Sat Oct 05 09:50:39 UTC 2013 Bugfix
A new version of this scenario was uploaded on Sat Oct 05 09:54:19 UTC 2013 Bugfix
A new version of this scenario was uploaded on Thu Oct 17 15:24:56 UTC 2013 Added more settings. Better simulation AI.


Hello Gevater_Tod4711 i have a few questions about your Project. First the question wether you are capable of the german language, cause it would be easier to communicate ;) , second wether you could tell me about which parts of your Code let the AI "learn" how to Play. I tried to understand but im not so good in programming. I would appreaciate it when you could respond to my questions. Yours sincerely DinTirith

Want to leave a comment? You must first log in.

Who likes this?