Skip to content

Instantly share code, notes, and snippets.

@morgankenyon
Created May 2, 2020 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morgankenyon/b7286f6831968360694353ce2544908b to your computer and use it in GitHub Desktop.
Save morgankenyon/b7286f6831968360694353ce2544908b to your computer and use it in GitHub Desktop.
from ttt.player import Player
from ttt.game import Game
from ttt.random_bot import RandomBot
from ttt.two_layer_bot import TwoLayerBot
def main():
xbot = RandomBot(Player.x)
obot = TwoLayerBot(Player.o)
game = Game(1000)
print ("randombot (x) vs twolayerbot (o)")
game.simulate(xbot, obot)
xbot = TwoLayerBot(Player.x)
obot = RandomBot(Player.o)
game = Game(1000)
print ("twolayerbot (x) vs randombot (o)")
game.simulate(xbot, obot)
xbot = TwoLayerBot(Player.x)
obot = TwoLayerBot(Player.o)
game = Game(1000)
print ("twolayerbot (x) vs twolayerbot (o)")
game.simulate(xbot, obot)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment