• 2D Soccer Simulation
  • Snake

The rules:

  1. Each person can have one team's membership, therefore, an extra membership as a supervisor, guide or member is not possible.

  2. It's legal for teams to use the source codes published before 2019 If they have changed it effectively.

  3. The presence of an obvious code sharing among the participating teams' codes will lead to disqualification of all the teams that use it. (a shared code is a code that has not been published.)

  4. Disqualified teams at qualification level or at the competition time are not allowed to participate in the next NasirCup.

  5. During the competition, the rules specify the general policy and the technical committee can apply their opinion under any unpredictable or special condition. Required documents:

    1. Team description paper or TDP, which includes a technical description of the ideas implemented in the team source code and plans.
      1. TDP is the most important source for technical committee qualification. Therefore, teams should describe their most effective implemented ideas.
      2. Team members full name should be written in TDP's first page. These names are final edition will result in disqualification.
      3. TDP can be written in Persian or English.
    2. TDP should include log files with scenes that approve the implementation of the ideas.

      1. One to five files can be delivered.
      2. A document attachment containing the description of the log files must be delivered to the technical committee, as well.
    3. An archive file of the teams' executable files, including :

      1. Binary files compiled statically.
      2. Start and Kill scripts for the complete execution of the team.
      3. All the configuration files, etc that binary files demand at the run time.
  6. Every team should upload the required materials before 29th of august on the competition website. It is obvious lack of required files would result in disqualification

In order to ask your questions contact us at nasircup@kn2c.ir

About The Competition :

Snake is one of the most popular games on several platforms. this game was first operated on Nokia phones in 1997 and got lots of people's attention. In 2013, at the Shiraz University of Technology, the snake league was held. in this competition, four smart snakes competed with each other for eating apples as many as possible. The tournament was built by Java programming language. now We have a league called 2D Snake Simulation in NasirCup tournament. server and monitor are implemented using the Python language. In this part, 4 snakes compete in a dynamic environment. Each Snake is implemented by Python or C++ language. In this competition, the winner is the one who has less collision with walls and gets the highest number of apples!

How To Run The Game:

Download The Client And The Server

To run this game:

  1. Convert game to snake in conf/conf.py.

  1. At first, run the server by running server.py.

  2. Now the server is waiting for snake4 connection. To do this run the command below :

    ./client.py -n team_name -c client_type

    In this command "team_name" will be displayed as your team's on the monitor. You should add your team's code at Games/Snake/Client/python/Client.py like this:

    import Games.Snake.Client.Python.YourClient as c_your

    In the end, add this client file of yours to the existent clients. As an example in the box below your 'client_type' is 'yours'.

    And you should run this command:

    ./client.py -n borna -c your

    Be careful that the command should be run for each client and 'team_name' fields should be different.

  1. Now run the monitor by running monitor.py. Now games graphic will be displayed and the game will be started by ctrl + c.

The Rules:

  1. As the snake collides the walls, the score will be decreased five points and the snake will be reset to its initial length and location.

  2. As the snake collides another snake's body, the snake collides with its head will be reset and lose 5 points.

  3. As the snakes' head collides, one of them will be reset and lose 5 points.

  4. As the snake eats a fruit, the snake will get one point and enlarge one unit.

  5. The snake with the bigger score is the winner and the length of it is not concerned.