Advertisement
Guest User

Untitled

a guest
May 6th, 2021
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.86 KB | None | 0 0
  1. End the game with more points than your opponent.
  2.  
  3. The game takes place in a forest, in which gentle wood spirits reside. Their job is to make sure trees complete their lifecycle.
  4. Two wood spirits have started to compete over which one is the most efficient.
  5. Grow trees at strategic locations of the forest to maximize your points.
  6. Rules
  7. Each player embodies a wood spirit. The game takes place on a hexagonal grid representing the forest.
  8. The game is played over several rounds called days. Each day can be made up of several game turns. On each turn, both players perform one action simultaneously.
  9. In this league, there is only 1 day.
  10. Forest
  11. The forest is made up of 37 hexagonal cells, arranged to form a larger hexagon.
  12. Each cell may contain a tree. Each tree is owned by one of the players.
  13. Each cell has a richness which can be:
  14. 1 for low quality soil.
  15. 2 for medium quality soil.
  16. 3 for high quality soil.
  17. Days
  18. At the start of each day, players receive sun points.
  19. Then, players take actions by spending their sun points.
  20. The day ends when both players stop taking actions.
  21. More information on sun points and actions further down.
  22. Sun Points
  23. Helping the wood spirits are lesser spirits hiding among all the trees.
  24. The forest's lesser spirits will harvest sun points from each tree.
  25. The points will be given to the owner of the tree.
  26. In this league, you gain 3 sun points per tree.
  27.  
  28. A sun point
  29. Actions
  30. After collecting sun points, both players take simultaneous turns performing one of two possible actions.
  31. As long as you have enough sun points, you can take any number of actions.
  32. The possible actions are:
  33. COMPLETE: Command a tree to complete its lifecycle. This removes the tree from the forest and scores you points. More information about points further down.
  34. WAIT: Spend the rest of the day asleep. For this league, when both players are asleep, the game ends.
  35. Complete action
  36. Completing a tree's lifecycle requires 4 sun points.
  37. The forest starts with a nutrient value of 20.
  38. Completing a tree's lifecycle will award you with as many points as the current nutrient value + a bonus according to the richness of the cell:
  39. 1: +0 points.
  40. 2: +2 points.
  41. 3: +4 points.
  42. Then, the nutrient value is decreased permanently by 1.
  43. ⛔ Game end
  44. For this league, the game lasts 1 day.
  45. Players gain an extra 1 point for every 3 sun points they have at the end of the game.
  46. If players have the same score, the winner is the player with the most trees in the forest. Note that a seed is also considered a tree.
  47. Victory Conditions
  48. The winner is the player with the most points.
  49. Defeat Conditions
  50. Your program does not provide a command in the allotted time or it provides an unrecognized command.
  51.  
  52. 🐞 Debugging tips
  53. Hover over a cell to see extra information about it
  54. Append text after any command and that text will appear next to your wood spirit
  55. Press the gear icon on the viewer to access extra display options
  56. Use the keyboard to control the action: space to play/pause, arrows to step 1 frame at a time
  57. Technical Details
  58. Players start the game with size 3 trees placed randomly on the grid.
  59. If both players complete a lifecycle on the same turn, they both receive full points and the nutrient value is decreased by two.
  60. The nutrient value cannot drop below 0.
  61. You can check out the source code of this game on this GitHub repo.
  62. Game Protocol
  63. Initialization Input
  64. First line: numberOfCells equals 37.
  65. Next numberOfCells lines: 8 space-separated integers:
  66. index for the cell's index.
  67. richness for its richness.
  68. 6 neigh variables: Ignore for this league.
  69. Input for One Game Turn
  70. First line: An integer day: the current day. Equals 0 for this league.
  71. Next line: An integer nutrients: the current nutrient value of the forest.
  72. Next line: 2 space-separated integers:
  73. mySun: your current sun points.
  74. myScore: your current score.
  75. Next line: 3 space-separated integers:
  76. oppSun: your opponent's sun points.
  77. oppScore: your opponent's score.
  78. oppIsWaiting: equals 1 if your opponent is asleep, 0 otherwise.
  79. Next line: An integer numberOfTrees for the current number of trees in the forest.
  80. Next numberOfTrees lines: 4 space-separated integers to describe each tree:
  81. cellIndex: the index of the cell this tree is on.
  82. size: the size of the tree. From 0 (seed) to 3 (large tree).
  83. isMine: 1 if you are the owner of this tree, 0 otherwise.
  84. isDormant: Ignore in this league.
  85. Next line: An integer numberOfPossibleActions for the number of legal moves you can make this turn.
  86. Next numberOfPossibleActions lines: A string possibleAction containing one of the actions you can output this turn.
  87. This list is provided to help you get started.
  88. Output
  89. A single line with your command:
  90. COMPLETE index: make your large tree on the specified cell complete its lifecycle. This removes the tree.
  91. WAIT: go to sleep.
  92. Constraints
  93. Response time per turn ≤ 100ms
  94. Response time for the first turn ≤ 1000ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement