Giter Site home page Giter Site logo

connect4-rust's Introduction

Connect4 Bot

Traditional board size, "X" vs. "O"

Running

Interactive mode: cargo run Single-Turn mode (used for API): cargo run single-turn

Interactive mode

Play by entering column numbers, starting at 0, increasing going right (max column number is 6)

Single-Turn mode

Board must be fed in as simple 7x6 characters, being "X", "O", or "_" (empty). See example file We assume that X is the player using the API. The bot will play O, and place it on the board. The output can be in one of two categories:

  • It starts with "---". This means that the game is not over. What follows after this line is the state of the new board.
  • Any other condition means the output is a CSV file with columns x, y, and team. Team will be the same in both (which is the winner) and the x and y will be coordinates of the two endpoints of the connect 4.

Parameters

(see main.rs)

TWO_PLAYER - whether or not it's two player.

NUM_TEST_GAMES - number of random test games to be played in the Montecarlo simulation. Balance between "accuracy" and speed. 10,000 is reasonable.

connect4-rust's People

Contributors

veggiebob avatar

Watchers

 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.