-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Thibault Serti edited this page Sep 14, 2019
·
9 revisions
Welcome to the AwAI wiki! The AwAI project is an implementation of the awale game (Abapapa version). It's goal is to be an application that's will be deployed on web platform. We focus here on the IA part and our goal is to create several versions of IAs that will be able to fight each other. For now, we implemented a classical IA based on the minimax algorithm and we implemented the alpha beta IA.
The code has to be understood as three distinct part :
you can try :
from tests import *
t = Test("alea", "alea", 10)
t.run()
print(t.stat)
if you want to test parallelization you can try
from tests import *
t = Test("alea", "alea", 10)
t.run_on_all_cores()
print(t.stat)
To test the game with the GUI :
python3 main.py
- Create a new file
src/AIs/myAI.py
and a new class in that file - Add a condition in the
player.py
file, inAI
class init method to match the name of your AI - Add your AI to the
algo_available
list (inengine.py
)
- Open the right file (
minimax.py
oralphabeta.py
) - Write the gain as a method of the class
- Update gain and make sure that the variable you use are in the right scope
- Make sure that the list
list_coeff_gain
is of the right size (for now you have to modify manually the list in the fileplayer.py
, but in the future it will be automatically recalculated by the genetic algorithm.)