Code Monkey home page Code Monkey logo

ultimate_tictactoe's Introduction

Ultimate (or 9x9) Tic Tac Toe

What is this thing? See http://mathwithbaddrawings.com/2013/06/16/ultimate-tic-tac-toe/ for details.

Requirements

  • Python 2.7, 3.5+; PyPy; PyPy3

Getting Started

To set up your local environment you should create a virtualenv and install everything into it. :

$ mkvirtualenv tictactoe

Pip install this repo, either from a local copy, :

$ pip install -e ultimate_tictactoe

or from github, :

$ pip install git+https://github.com/jbradberry/ultimate_tictactoe#egg=ut3

and then install the requirements :

$ pip install -r requirements_server.txt
$ pip install -r requirements_player.txt

To run the server with Ultimate Tic Tac Toe :

$ board-serve.py t3

Optionally, the server ip address and port number can be added :

$ board-serve.py t3 0.0.0.0
$ board-serve.py t3 0.0.0.0 8000

To connect a client as a human player :

$ board-play.py t3 human
$ board-play.py t3 human 192.168.1.1 8000   # with ip addr and port

or with the provided AI player :

$ board-play.py t3 t3.jrb_mcts

ultimate_tictactoe's People

Contributors

jbradberry avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

ultimate_tictactoe's Issues

codec can't encode characters in position 0-18: character maps to <undefined>

Hi,
I couldn't run this game, this is the error I receive:

(tictactoe) C:\Users\eladl\Desktop\tic\src\boardplayer\bin>python board-play.py t3 human
You are player #1.
Traceback (most recent call last):
File "board-play.py", line 37, in
client.run()
File "c:\users\eladl\desktop\tic\src\boardplayer\boardplayer\player.py", line 31, in run
self.receiverdata['type']
File "c:\users\eladl\desktop\tic\src\boardplayer\boardplayer\player.py", line 53, in handle_update
print self.player.display(state, action)
File "C:\Program Files\Anaconda3\envs\tictactoe\lib\encodings\cp1255.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-18: character maps to

How to actually play with a bot?

When following the readme, I got following:
% board-play.py t3 t3.jrb_mcts
usage: board-play.py [-h] [-e EXTRA] {t3} {human} [address] [port]
board-play.py: error: argument player: invalid choice: 't3.jrb_mcts' (choose from 'human')

also, if connect as human, how to actually start the game?
% board-play.py t3 human
You are player #1.
╔═╤═╤═╦═╤═╤═╦═╤═╤═╗
║ │ │ ║ │ │ ║ │ │ ║
╟─┼─┼─╫─┼─┼─╫─┼─┼─╢
║ │ │ ║ │ │ ║ │ │ ║
╟─┼─┼─╫─┼─┼─╫─┼─┼─╢
║ │ │ ║ │ │ ║ │ │ ║
╠═╪═╪═╬═╪═╪═╬═╪═╪═╣
║ │ │ ║ │ │ ║ │ │ ║
╟─┼─┼─╫─┼─┼─╫─┼─┼─╢
║ │ │ ║ │ │ ║ │ │ ║
╟─┼─┼─╫─┼─┼─╫─┼─┼─╢
║ │ │ ║ │ │ ║ │ │ ║
╠═╪═╪═╬═╪═╪═╬═╪═╪═╣
║ │ │ ║ │ │ ║ │ │ ║
╟─┼─┼─╫─┼─┼─╫─┼─┼─╢
║ │ │ ║ │ │ ║ │ │ ║
╟─┼─┼─╫─┼─┼─╫─┼─┼─╢
║ │ │ ║ │ │ ║ │ │ ║
╚═╧═╧═╩═╧═╧═╩═╧═╧═╝
Player: 1

Please enter your action: 1 1
Please enter your action: R 1
Please enter your action: R 2
Please enter your action: R 1 2
Please enter your action: C 1 2
Please enter your action: help
Please enter your action: h
Please enter your action:

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.