Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
This implements Negamax on steroids. The following example shows
how to setup the AI and play a Connect Four game:

    >>> from easyAI.games import ConnectFour
    >>> from easyAI import Negamax, Human_Player, AI_Player
    >>> scoring = lambda game: -100 if game.lose() else 0
    >>> ai_algo = Negamax(8, scoring) # AI will think 8 turns in advance
    >>> game = ConnectFour([Human_Player(), AI_Player(ai_algo)])
    >>> game.play()
(more...)

src/e/a/easyAI-0.0.0.4/easyAI/__init__.py   easyAI(Download)
from .TwoPlayersGame import TwoPlayersGame
from .Player import Human_Player, AI_Player
from .AI import Negamax, DictTT, id_solve, df_solve
 

src/e/a/easyAI-HEAD/easyAI/__init__.py   easyAI(Download)
from .TwoPlayersGame import TwoPlayersGame
from .Player import Human_Player, AI_Player
from .AI import Negamax, DictTT, id_solve, df_solve