GithubHelp home page GithubHelp logo

gomoku's Introduction

Hi there 👋

About me

I'm Thomas. I'm a student at Epitech. I'm interested in programming. I like to discover different things and improve my knowledge with it. I'm currently in Japan, for an exchange year in Shibaura Institute of Technology.

My skills

  • Preferred programmation languages

  • Programmation languages I already used

  • Tools and frameworks I use to work

Profile views

gomoku's People

Contributors

nekomay avatar osvegn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

gomoku's Issues

Update Issue and Pull Request templates

Describe the feature

  • Update issue and pull request template to auto set GitHub project linked to them

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Create readstdin function

Describe the feature

Create basic function to read stdin fd, and fill the buffer passed as parameter

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Implement turn protocol

Describe the feature

  • Implement the turn protocol

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Protocol website: https://plastovicka.github.io/protocl2en.htm


TURN [X],[Y]
The parameters are coordinate of the opponent's move. All coordinates are numbered from zero.

Expected answer:
two comma-separated numbers - coordinates of the brain's move

Example:
The manager sends:
TURN 10,10
The brain answers:
11,10

Implement end protocol

Describe the feature

  • Implement the end protocol

Describe alternatives

Describe any alternative to the feature describe before here

Additionals


END
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.

Expected answer: none
The brain should delete its temporary files.

Add build tests in CI

Describe the feature

  • Add build tests in CI on Windows and Ubuntu platforms

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Implement info protocol

Describe the feature

  • Implement the info protocol

Describe alternatives

Describe any alternative to the feature describe before here

Additionals


INFO [key] [value]
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

Add vector library

Describe the feature

Add a vector library in C

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Codecov coverage haven't any report

Describe the bug
There isn't coverage percentage on badge, and codecov haven't any code

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'\
  3. Scroll down to '....'
  4. See error

Expected behavior
Codecov needs code to run, maybe a token error

Additional context
Add any other context about the problem here.

Create Makefile compliant to the Epitech tests

Describe the feature

  • Create a Makefile including re, clean, fclean, all

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Detect victory condition

Describe the feature

  • Find if there is a victory condition. It can be three-piece aligned without any piece at each extremity and one extremity with two empty space, or if there is four-piece aligned without piece at one extremity.

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Implement start protocol

Describe the feature

  • Implement the start protocol.

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Protocol website: https://plastovicka.github.io/protocl2en.htm


START [size]
When the brain receives this command, it initializes itself and creates an empty board, but doesn't make any move yet. The parameter is size of the board. The brain must be able to play on board of size 20, because this size will be used in Gomocup tournaments. It is recommended but not required to support other board sizes. If the brain doesn't like the size, it responds ERROR. There can be a message after the ERROR word. The manager can try other sizes or it can display an error message to a user. The brain responds OK if it has been initialized successfully.
Example:
The manager sends:
START 20
The brain answers:
OK - everything is good
ERROR message - unsupported size or other error

Add protocols management

Describe the feature

Add all is needed to use all the protocols

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Create function to print something properly / quickly

Describe the feature

Create a print function used to communicate compliant with the communication protocol describe here.

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Fix board usage

Describe the solution you'd like

  • The board can be an int * instead of an int ** to keep more free space

Additional context
Add any other context or screenshots about the feature request here.

Create board manipulation

Describe the feature

  • Create a structure to store the board with the actual piece that have been played
  • Create a function to get the board
  • Create a function to add a piece to the board

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Implement board protocol

Describe the feature

  • Implement the board protocol

Describe alternatives

Describe any alternative to the feature describe before here

Additionals


BOARD
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.

After this command 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) or number 3 (only if continuous game is enabled, stone is part of winning line or is forbidden according to renju rules).

If game rule is renju, then the manager must send these lines in the same order as moves were made. If game rule is Gomoku, then the manager may send moves in any order and the brain must somehow cope with it. Data are ended by DONE command. Then the brain is expected to answer such as to TURN or BEGIN command.

Example:
The manager sends:
BOARD
10,10,1
10,11,2
11,11,1
9,10,2
DONE
The brain answers:
9,9

Implement begin protocol

Describe the feature

  • Implement the begin protocol

Describe alternatives

Describe any alternative to the feature describe before here

Additionals


BEGIN
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. After that the other brain obtains the TURN command with the first opponent's move. The BEGIN command is not used when automatic openings are enabled, because in that case both brains receive BOARD commands instead.

Expected answer:
two numbers separated by comma - coordinates of the brain's move

Example:
The manager sends:
BEGIN
The brain answers:
10,10

Run tests on CI

Describe the feature

  • Run unit tests on CI
  • Use codecov to create a badge to know the coverage percentage on our project

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Create CMake project architecture

Describe the feature

Create a basic architecture with CMake to allow compiling the beginning project.

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Fix tests

Describe the solution you'd like
Fix tests that have been turn into comments.

Additional context
Add any other context or screenshots about the feature request here.

Fix build Windows on CI

Describe the bug

  • The CI failed on Windows

Additional context


2022-11-19T00:32:55.6130683Z Switched to a new branch 'main'
2022-11-19T00:32:55.6131115Z ##[endgroup]
2022-11-19T00:32:55.6131537Z [command]"C:\Program Files\Git\bin\git.exe" log -1 --format='%H'
2022-11-19T00:32:55.6131959Z 'dc3316e649ca37d22cb8194b002e64cfc2df787d'
2022-11-19T00:32:55.6488666Z ##[group]Run mkdir -p build
2022-11-19T00:32:55.6489069Z �[36;1mmkdir -p build�[0m
2022-11-19T00:32:55.6489318Z �[36;1mcd build && cmake .. && cmake --build .�[0m
2022-11-19T00:32:55.6634161Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2022-11-19T00:32:55.6634470Z ##[endgroup]
2022-11-19T00:33:04.4370617Z
2022-11-19T00:33:04.4382545Z Directory: D:\a\Gomoku\Gomoku
2022-11-19T00:33:04.4382966Z
2022-11-19T00:33:04.4384794Z �[32;1mMode LastWriteTime Length Name�[0m
2022-11-19T00:33:04.4385263Z �[32;1m---- ------------- ------ ----�[0m
2022-11-19T00:33:04.4385749Z d---- 11/19/2022 12:33 AM build
2022-11-19T00:33:05.5520342Z -- Building for: Visual Studio 17 2022
2022-11-19T00:33:20.0873098Z -- The C compiler identification is MSVC 19.33.31630.0
2022-11-19T00:33:20.2400000Z -- Detecting C compiler ABI info
2022-11-19T00:33:21.5166630Z -- Detecting C compiler ABI info - done
2022-11-19T00:33:21.5196026Z -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
2022-11-19T00:33:21.5207251Z -- Detecting C compile features
2022-11-19T00:33:21.5220670Z -- Detecting C compile features - done
2022-11-19T00:33:21.5240508Z -- Configuring done
2022-11-19T00:33:21.5550203Z -- Generating done
2022-11-19T00:33:21.5564604Z -- Build files have been written to: D:/a/Gomoku/Gomoku/build
2022-11-19T00:33:21.6703621Z MSBuild version 17.3.1+2badb37d1 for .NET Framework
2022-11-19T00:33:22.1452282Z Checking Build System
2022-11-19T00:33:22.3192839Z Building Custom Rule D:/a/Gomoku/Gomoku/CMakeLists.txt
2022-11-19T00:33:22.4732360Z main.c
2022-11-19T00:33:22.4880733Z my_printf.c
2022-11-19T00:33:22.9627718Z readstdin.c
2022-11-19T00:33:23.0720499Z start_protocol.c
2022-11-19T00:33:23.0968807Z Generating Code...
2022-11-19T00:33:23.8795793Z readstdin.obj : error LNK2019: unresolved external symbol getline referenced in function readstdin [D:\a\Gomoku\Gomoku\build\pbrain-gomoku-ai.vcxproj]
2022-11-19T00:33:23.8796647Z D:\a\Gomoku\Gomoku\Debug\pbrain-gomoku-ai.exe : fatal error LNK1120: 1 unresolved externals [D:\a\Gomoku\Gomoku\build\pbrain-gomoku-ai.vcxproj]
2022-11-19T00:33:23.8796979Z
2022-11-19T00:33:23.8957687Z ##[error]Process completed with exit code 1.
2022-11-19T00:33:23.9143988Z Post job cleanup.

Add basic norm check for C in CI

Describe the feature

  • Update CI to check the Epitech coding style in C first (as much as possible)

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Create macro with all available patterns

Describe the feature

  • Create a macro to know all useful patterns of gomoku game

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Fix windows artifact upload

Describe the solution you'd like
Windows executable is not found by the artifact uploader, find the correct path and update it.
Use an environnement to get release on main page

Additional context

  • Update cmake to create release instead of debug file

Improve victory condition detection

Describe the solution you'd like

  • Improve the victory condition detection

Additional context
Add any other context or screenshots about the feature request here.

Run tests on CI

Describe the feature

  • Compile and run tests made for the project on CI, depending on build_linux success

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Fix issue and pull request templates

Describe the fix

  • Remove header in pull request template
  • Remove project field in header of issue templates
  • Update bug issue template
  • Create fix issue template

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Implement about protocol

Describe the feature

  • Implement the about protocol

Describe alternatives

Describe any alternative to the feature describe before here

Additionals


ABOUT
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.

Example:
The manager sends:
ABOUT
The brain answers:
name="SomeBrain", version="1.0", author="Nymand", country="USA"

Fix release creation on CI

Describe the solution you'd like

  • Update download artifact to upload artifact on linux
  • Set correct path of executable on linux and windows

Additional context
Add any other context or screenshots about the feature request here.

Create template unit test

Describe the feature

  • Allow unit test build using cmake
  • Create a rule in makefile to run these unit tests
  • Create a template of unit test

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Improve IA basic place choice

Describe the feature

  • Improve the IA piece placement strategy to place a piece near another one

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

Create functional test template

Describe the feature

  • Create functional test template using bash scripts
  • Create a script to show functional test stats (like how many tests passed or failed)

Describe alternatives

Describe any alternative to the feature describe before here

Additionals

Add any other context or screenshots here

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.