Giter VIP home page Giter VIP logo

pentago_twist's Introduction

pentago_twist

Pentago-Twist falls into the Moku family of games. Other popular games in this category include Tic-Tac-Toe and Connect-4, although Pentago-Twist has significantly more complexity. The biggest difference in Pentago-Twist is that the board is divided into quadrants, which can be flipped or rotate 90 degree right during the game.

Setup

Pentago-twist is a two-player game played on a 6x6 board, which consists of four 3x3 quadrants. To begin, the board is empty. The first player plays as white and the other plays as black.

Objective

In order to win, each player tries to achieve 5 pieces in a row before their opponent does. A winning row can be achieved horizontally, vertically or diagonally. If all spaces on the board are occupied without a winner then a draw is declared. If rotating/flipping single quadrant results in a five-in-a-row for both players, the game also ends in a draw.

Playing

Moves consist of two phases: placing and rotating/flipping. On a given player's turn, a piece is first placed in an empty slot on the board. The player then selects a quadrant, and can choose either to flip or rotate 90 degree right. A complete move therefore consists of placing a piece, then rotating/flipping.

Strategy

Allowing quadrants to be flipped/rotated introduces significant complexity and your AI agent will need to contend with this high branching complexity. Since quadrants can be flipped/rotated, blocking an opponent's row is not as easy as simply placing an adjacent piece. A good AI agent might consider balancing seeking to win with preventing their opponent from achieving the same.


Navigate through the scripts

src  
|  --- autoplay ( Autoplays games; can be ignored) 
| --- boardgame (Package for implementing boardgames, logging, GUI, and server TCP protocol, can be ignored for this project)
| --- student_player (Package containing your agent)
|      | --- StudentPlayer.java (The class you will implement your AI within)
|      | --- MyTools.java (Placeholder for any extra code you may need)} \nonumber 
| --- pentago_swap (The package implementing all game logic)
|      | --- PentagoBoardPanel.java (Implements the GUI, can be ignored)
|      | --- PentagoBoard.java (Used for server logic, can be ignored)
|      | --- PentagoCoord.java (Simple class representing a board coordinate)
|      | --- PentagoMove.java (A move object for Pentago. Relevant functions)
|      | --- PentagoBoardState.java (Implements all game logic, most important. Note that PentagoBoardState (PBS) manages} logic concerning whose turn it is, rules, and the positions of all pieces)
|      | --- PentagoPlayer.java (Abstract class that all players extend)} 
|      | --- RandomPentagoPlayer.java (A random player, can be used as a baseline)

pentago_twist's People

Contributors

baricisse avatar esalehi1996 avatar preyansh98 avatar saminyeasar 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.