Giter VIP home page Giter VIP logo

ultimate-ttt-py's Introduction

Ultimate TicTacToe - Python Player & Game Engine

Travis PyPI Coverage

This repo contains a sample player and game engine for our Ultimate Tic-Tac-Toe workshop_.

Welcome!

Welcome! You're probably here because you're in a hackathon we're running.

If so, make sure you've read our Documentation.

Once you're ready to write your player, you can find functions that will help you write your player in API Reference

Contributors

If you're interested in contributing a player or even features to the game engine:

  1. Thank you!
  2. Please read the Contribution Guide

ultimate-ttt-py's People

Contributors

alexmillward avatar joffat avatar reddyalready avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ultimate-ttt-py's Issues

Add move indices to sub board cells

Adding the move index to each cell records the order of the game and makes it easier to replay in the future (e.g. first cell played has a 1, second one has a 2 etc.)

Investigate bug in MainBoard

MainBoard erroneously reports opponent's move being on an invalid board, even though the sequence of moves is valid:

[jerky@neptun ultimate-ttt-py]$ uabc --host localhost:3141 -t bar --verbose -f "python3 samples/random_player_wrapper.py"
+----------------------------------+
| Ultimate Algorithm Battle |
+----------------------------------+

Waiting for server...

Connected!
[00:40:17 server] init
[00:40:17 server] waiting
[00:40:17 server] opponent 2,2;2,1
[00:40:17 player] 2,1;1,1

[00:40:17 server] opponent 1,1;1,2
Error: Traceback (most recent call last):
File "samples/random_player_wrapper.py", line 12, in
main()
File "samples/random_player_wrapper.py", line 7, in main
random_player.process_input(line.strip())
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt_player/ultimate_ttt_player.py", line 67, in process_input
self.add_opponent_move(board_coords, opponent_move)
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt_player/random_player.py", line 22, in add_opponent_move
self.game = self.game.add_opponent_move(board, opponent_move)
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt/main_board.py", line 95, in add_opponent_move
return self._add_move(board_coords, PlayerMove(Player.OPPONENT, move))
File "/usr/local/lib/python3.4/dist-packages/ultimate_ttt/main_board.py", line 178, in _add_move
raise MoveNotOnNextBoardError(board_coords, self._next_board_coords)
ultimate_ttt.errors.MoveNotOnNextBoardError
client> child process exited with code 1
Connection lost!

This indicates a problem either with the MainBoard or the player itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.