Code Monkey home page Code Monkey logo

gomoku's Introduction

πŸ’« About Me:

πŸ’» I'm currently a student at Epitech
πŸ‡¨πŸ‡¦ On a scholar exchange in Canada
🌱 I'm currently learning a lot about business and also Swift
πŸ’› Developer @ NoLoSay
πŸ† I'm a player of basketball since I can walk
Visit my website here!

johancdev

johancdev

🌐 Socials:

Discord LinkedIn

πŸ’» Tech Stack:

C C++ JavaScript Ruby Swift TypeScript Firebase Azure React NodeJS ANDROID IOS Rails Xamarin Yarn NPM Jenkins Postgres SQLite Adobe XD Figma LINUX Arduino Docker Jira Kubernetes

πŸ“Š GitHub Stats:

johancdev

Β johancdev

johancdev

πŸ” Top Contributed Repo

gomoku's People

Contributors

31nathan avatar guyomt avatar johancdev avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gomoku's Issues

Add the MESSAGE command

Description of the command

The message for a user. The manager can write it to some log window or to a log file. The brain is expected to send messages just before respond to some command. There must not be a new line character inside a message. Multi-line text can be sent as a sequence of two or more MESSAGE commands.

Format of the command

MESSAGE [message]

Create board class

Class that will contain Board information

Empty Cell -> '-'
Brain Cell -> 'B'
Manager Cell -> 'M'

Add the DEBUG command

Description of the command

It is similar to MESSAGE command, but it is used for debugging information that is useful only for the author of the brain. These messages will not be visible to public in Gomocup tournament.

Format of the command

DEBUG [message]

Add the ERROR command

Description of the command

The brain sends this as a respond to a command that is unknown or not yet implemented. That means the brain must not exit after receiving some strange line from the manager. The parameter after UNKNOWN keyword is message that can be displayed by the manager to a user. If the manager has sent some optional command which the brain does not implement, then the manager is required to try some mandatory command.

Format of the command

ERROR [message]

Add the BOARD command

Description of the command

This command imposes entirely new playing field. It is suitable for continuation of an opened match or for undo/redo user commands. The BOARD command is usually send after START, RESTART or RECTSTART command when the board is empty. If there is any open match, the manager sends RESTART command before the BOARD command.

Format of the command

BOARD

Possible answers

The data forming the playing field are send. Every line is in the form:
[X],[Y],[field]
where [X] and [Y] are coordinates and [field] is either number 1 (own stone) or number 2 (opponent's stone)

ERROR [message]

Add the ABOUT command

Description of the command

The brain is expected to send some information about itself on one line. Each info must be written as keyword, equals sign, text value in quotation marks. Recommended keywords are name, version, author, country, www, email. Values should be separated by commas that can be followed by spaces. The manager can use this info, but must cope with old brains that used to send only human-readable text.

Format of the command

ABOUT

Possible answers

name="<brain_name>", version="<brain_version>", author="<brain_author>", country="<brain_nationality>"
ERROR [message]

Add the END command

Description of the command

When the brain obtains this command, it must terminate as soon as possible. The manager waits until the brain is finished. If the time of termination is too long (e.g. 1 second), the brain will be terminated by the manager. The brain should not write anything to output after the END command. However, the manager should not close the pipe until the brain is ended.
The brain should delete it's temporary files

Format of the command

END

Possible answers

none are expected
ERROR [message]

Manager input parser

Parse inputs

[<command_type>, <1st parameter>, <2nd parameter>, ...]

Send command in map to handle it

Add the INFO command

Description of the command

The manager sends information to the brain. The brain can ignore it. However, the brain will lose if it exceeds the limits. The brain must cope with situations when the manager doesn't send all information which is mentioned in this document. Most of this information is sent at the beginning of a match. The time limits will not be changed in the middle of a match during a tournament. It is recommended to react on commands at any time, because the human opponent can change these values even when the brain is thinking.
The key can be:
timeout_turn - time limit for each move (milliseconds, 0=play as fast as possible)
timeout_match - time limit of a whole match (milliseconds, 0=no limit)
max_memory - memory limit (bytes, 0=no limit)
time_left - remaining time limit of a whole match (milliseconds)
game_type - 0=opponent is human, 1=opponent is brain, 2=tournament, 3=network tournament
rule - bitmask or sum of 1=exactly five in a row win, 2=continuous game, 4=renju
evaluate - coordinates X,Y representing current position of the mouse cursor
folder - folder for persistent files
Information about time and memory limits is sent before the first move (after or before START command). Info time_left is sent before every move (before commands TURN, BEGIN and BOARD). The remaining time can be negative when the brain runs out of time. Remaining time is equal to 2147483647 if the time for a whole match is unlimited. The manager is required to send info time_left if the time is limited, so that the brain can ignore info timeout_match and only rely on info time_left.
Time for a match is measured from creating a process to the end of a game (but not during opponent's turn). Time for a turn includes processing of all commands except initialization (commands START, RECTSTART, RESTART). Turn limit equal to zero means that the brain should play as fast as possible (eg count only a static evaluation and don't search possible moves).

INFO folder is used to determine a folder for files that are permanent. Because this folder is common for all brains and maybe other applications, the brain must create its own subfolder which name must be the same as the name of the brain. If the manager does not send INFO folder, then the brain cannot store permanent files.

Only debug versions should respond to INFO evaluate. For example, it can print evaluation of the square to some window. It cannot be written to the standard output. Release versions should just ignore INFO evaluate.

How should the brain behave when obtains unknown INFO command ?

  • Ignore it, it is probably not important. If it was important, it is not in an INFO command form.

How should behave the brain obtaining the unachievable INFO command?
(for example too small memory limit)

  • The brain should wait with the output of the problem until the manager sends the first command not having an INFO form (TURN, BOARD or BEGIN). The manager does not read messages from the brain when sending INFO command.

Format of the command

INFO [key]Β [value]

Possible answers

none are expected
ERROR [message]

Add the UNKNOWN command

Description of the command

The brain sends this as a respond to a command that is unknown or not yet implemented. That means the brain must not exit after receiving some strange line from the manager. The parameter after UNKNOWN keyword is message that can be displayed by the manager to a user. If the manager has sent some optional command which the brain does not implement, then the manager is required to try some mandatory command.

Format of the command

UNKNOWN [message]

Add the BEGIN command

Description of the command

This command is send by the manager to one of the players (brains) at the beginning of a match. This means that the brain is expected to play (open the match) on the empty playing board.

Format of the command

BEGIN

Possible answers

two numbers separated by comma - coordinates of the brain's move
ERROR [message]

Add the TURN command

Description of the command

The parameters are coordinate of the opponent's move. All coordinates are numbered from zero.

Format of the command

TURN [X],[Y]

Possible answers

Two comma-separated numbers - coordinates of the brain's move (ex: "10,10")
ERROR [message] on one line

Add Brain class

Class that will contain AI reflexion on movements to accomplish, it should get the input of the manager and choose what to do next.

Add the START command

Description of the command

Initializes brain and create an empty board, but doesn't make any move yet. The parameter is size of the board.

Format of the command

START [size] -> Only 20x20 is allowed on Epitech subject

Possible answers

OK -> Everything is good
ERROR [message] -> Unsupported size or other error

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.