Coder Social home page Coder Social logo

homeworlds's Introduction

Homeworlds AI

An AI for Homeworlds that uses Negamax.

Installation

curl https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp > tests/catch.hpp
make

Game Description Format

Will make a grammar or something once format is finalized. For now, here's an example. The first line is "[number of players] [number of homeworlds built] [current player]".

2 2 1
Alice (1, b1y2) 1g3 1g1 1g2
Bob (2, g3y2) 2b3 2b1 2b2
Sirius (r3) 1g1
Pluto (g1) 2b1

Usage

./main takes the current game state as input and outputs the AI's moves for the turn. .judge takes a game state and a turn as input and outputs the new game state, as well as whether a player has won the game. python run_game.py [initial game state file] runs the AI against itself using the judge.

homeworlds's People

Contributors

cibersheep avatar czinn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

cibersheep

homeworlds's Issues

It doesn't build in Ubuntu 16.04

When try to build the project:

g++ -g -Wall -MMD -std=c++0x    -c -o game.o game.cc
game.cc: In member function ‘int Game::winner() const’:
game.cc:133:12: error: ‘find_if’ was not declared in this scope
           }) != s.ships.end()) {
            ^

Possible fix is to #include <algorithm> into game.cc

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.