Department of Computer Science and Engineering, IIT Kanpur

CS245: Algorithms

Dr. R. K. Ghosh


Home | Notice Board | Instructor | TAs | Students | Assignments | Schedule | Lectures | Resources


Rules of the game
  1. Game will be between 2 players at a time.

  2. A player is allowed to pick any number of coins, which fall in same straight line, provided the coins are adjacent..

  3. If a player makes an invalid move, then he will be disqualified from the game and will get a negative score of -50 for the game, and the opponent will be declared the winner.

  4. The player program is allowed to make it's own logfile, which can be used by the program to learn from the past strategies.

  5. Game will be conducted between all pairs of players (i.e all the students).

  6. All the rounds will be round robin and the maximum credit will be given to program which makes the most improvement in score and wins between rounds

  7. Program using statically coded moves will get the least credit

Scoring scheme:

Each valid move will fetch the player some points according to the number of coins picked by him/her in that move.

Coins picked in a move

Points scored

1

5

2

5-4 = 1

3

5-4+7= 8

4

5-4+7-19= -11

5

5-4+7-9+12= 11

6

5-4+7-9+12-41= -30

Note:

The time limit per move will be 30 seconds for all the rounds

Your program should improve its strategy. For this purpose you should maintain log files yourself following the given naming conventions. No change of code will be permitted between rounds as all the rounds will be conducted on the same day.

The winner gets a bonus of 25 points (i.e the loser is the one who picks the last coin).

Submission of your program

A) Your required to submit 3 files

  1. Source code of the player program

  2. Executable file

  3. A text file which describes the stratagies implemented  in your program.

  4. Put all the files in a tar file and then upload

B) Naming convention  to be followed

  • Source code : groupnum.c (e.g.,cs20401.c)

  • Executable   : groupnum   (e.g.,cs20401)

  • Strategy Description  groupnum.txt (e.g., cs20401.txt)

  • Please note: Strategy file and source code should mention each group members' contribution clearly

  • Temporary Log files ( to be generated by your program,i.e the player program ) : groupnum.log1 , groupnum.log2 ...

C) Submission is to be done by uploading the tarred file to the course website.  


Home | Notice Board | Instructor | TAs | Students | Assignments | Schedule | Lectures | Resources


Page last updated 9 Feb, 2003 by Parag S. Mogre