Giter VIP home page Giter VIP logo

reversi-portal's Introduction

REVERSI BRAIN COMPETITION

Build Status experimental GPL Licence David

Introduction

Gomoku is an abstract strategy board game, also called Gobang or Five in a Row. It is traditionally played with Go pieces (black and white stones) on a go board with 19x19 (15x15) intersections; however, because pieces are not moved or removed from the board, gomoku may also be played as a paper and pencil game. This game is known in several countries under different names.

More information about Gomoku, see Gomoku - Wikipedia

In our game, two players take turns as black to move first. There are six rounds in total and each player moves first (as black) for three times.

Online Judge System

Visit ReversiJudge to take part in our competition!

Login in via your JAccount and submit your code altered from the file main.c we provided.

The max size of Source code and Compiled exe are both 1MB.

There are some warnings:

  1. Do not copy others' source code. All the code you submitted will be checked for plagiarism. Copycats will fail this project!
  2. Do not share your source code with others. Similar submissions will be treated as plagiarism.
  3. Do not use alternative account to submit your code, otherwise you will be recognized as a copycat.
  4. Do not abuse our cloud execution service, such as intentionally trying to shutdown our judge machine.

Deployment

(WIP)

Dependencies:

  • Node.js
  • MongoDB
  • Redis
  • rabbitMQ

Install dependencies on Debien/Ubuntu

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
$ nvm install 9 && nvm use 9
$ sudo apt-get install mongodb redis-server rabbitmq-server

If you are in Mainland China, it's recommended to use registry by taobao (or use cnpm)

$ npm config set registry https://registry.npm.taobao.org

Run the following command to create configuration scripts for both debug and in-production deployments. In DEBUG mode, config.debug.yaml overrides default settings; In PRODUCTION mode, config.debug.yaml and then config.production.yaml override default settings.

$ touch config.debug.yaml
$ touch config.production.yaml

Edit the configuration according to the comments given. Then, excecute the following command to build the package:

$ npm install -g npminstall
$ npminstall
$ npm run build:server
$ npm run build:ui

Finally, run

$ npm run start

to start the server.

Matching

Openings

Important: This part is only for reference, you may dismiss these when developing your own AI.

Black (the player who makes the first move) was long known to have a big advantage, so we will specify the beginning of the game so that both players will get the same advantage to make the game fair.

We assume the openings are exactly the displayed 5x5 square in the center, x represents black and o represents white

The followings are all of the opening situations (on the Judge System):

直指 (黑优)

1. 花月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o | x |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

2. 雨月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x | x |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

3. 松月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   | x |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

4. 溪月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   | x |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

5. 寒星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   | x |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

6. 瑞星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   | x |   |   |
  +---+---+---+---+---+

7. 金星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   | x |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

斜指 (黑优)

8. 浦月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   | x |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

9. 云月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x | x |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

10. 峡月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o | x |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

11. 银月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   | x |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

12. 岚月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   | x |   |
  +---+---+---+---+---+

13. 名月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   | x |   |   |   |
  +---+---+---+---+---+

14. 水月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   | x |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

15. 恒星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   | x |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

16. 明星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   | x |   |   |
  +---+---+---+---+---+

直指 (白优或均势)

17. 残月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   | x |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

18. 新月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   | x |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

19. 丘月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   | x |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

20. 山月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   | x |   |
  +---+---+---+---+---+

21. 游星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   | x |
  +---+---+---+---+---+

22. 疏星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   | x |
  +---+---+---+---+---+
6 |   |   | o |   |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

斜指 (白优或均势)

23. 斜月

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   | x |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

24. 长星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   | x |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   |   |
  +---+---+---+---+---+

25. 流星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 |   |   |   |   | x |
  +---+---+---+---+---+

26. 彗星

    5   6   7   8   9
  +---+---+---+---+---+
5 |   |   |   |   |   |
  +---+---+---+---+---+
6 |   |   |   | o |   |
  +---+---+---+---+---+
7 |   |   | x |   |   |
  +---+---+---+---+---+
8 |   |   |   |   |   |
  +---+---+---+---+---+
9 | x |   |   |   |   |
  +---+---+---+---+---+

Reference

  1. Gomoku - Wikipedia
  2. 五子棋26种开局 - 百度文库

Online Judge System by GomokuFun

Server by Luke Lazurite, Liu Yihao and Shen zheyu

Manual written by Liu Yihao

JI-SSTIA All Right Reverved

reversi-portal's People

Contributors

breezewish avatar tc-imba avatar reapor-yurnero avatar arsdragonfly avatar joshoy avatar sxkdz avatar bwbwbwbw avatar

Watchers

James Cloos avatar  avatar  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.