Code Monkey home page Code Monkey logo

pbrain-pyrandom's Introduction

pbrain-pyrandom

A Python Piskvork template

pbrain-pyrandom is the technical core of a "brain" (AI) for Piskvork gomoku manager used in Gomocup AI tournament, written in Python.

The code is basically the "Python copy" of C++ template written by Petr Lastovicka. This README is also partially copy of the C++ template's README.

Prerequisites and compilation

The Piskvork manager is a Win32 application and currently supports only Win32 compatible .exe files (furthermore whose name starts with pbrain- prefix). There are several ways how to create .exe from Python files.

Here I present the approach using PyInstaller and Windows command line:

  1. Install Windows (or Wine for Linux, originally the project was created and tested on Ubuntu 16.04 using Wine)
  2. Install Python (the code and also following instructions were tested with versions 2.7 and 3.6).
  3. Install pywin32 Python package: pip.exe install pypiwin32 (if not present "by default")
  4. Install PyInstaller: pip.exe install pyinstaller

To compile the example, use the following command line command:

cd C:\path\where\the\files\were\saved
pyinstaller.exe example.py pisqpipe.py --name pbrain-pyrandom.exe --onefile

Note: the executables pip.exe and pyinstaller.exe might need full path, in my case I used C:\Python27\Scripts\pip.exe and C:\Python27\Scripts\pyinstaller.exe.

How to create your own AI

Replace file example.py with your own algorithm. Please don't change file pisqpipe.py, because it contains communication between your AI and the game manager and it might be changed in future protocol versions. More information about the protocol and tournament rules can be found at Gomocup websites

pbrain-pyrandom's People

Contributors

stranskyjan avatar

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.