Mad Beaver in River Labyrinth

Problem #408

Tags: games interactive special c-1

Who solved this?

No translations... yet

As a sequel for the task about the game of River Labyrinth we are going to try actually play it. Your opponent is a Beaver, rather than human player. It is a poor and harmless creature, which is somewhat mentally altered (obviously due to reading too much news from the internet) - so it moves randomly between the cells and shouts various philosofical and social ideas. Scientists of Miskatonic University asked you to catch this animal - they are interested to try whether it can make political career...

So the game runs like this:

  1. On Beaver's turn it choses random direction and makes a move, which is affected by labyrinth properties as usually - e.g. rivers, pits and so on work on beaver as on human player. Beaver's move and its outcome is announced to you.
  2. On your turn you pick direction wisely and tell your decision to server (with commands North, South, East or West). You are also informed of the result.
  3. So beaver and you continue to move in turns, until you issue Catch command - which means you try to administer sedative injection to the animal. If animal is in the same cell as you, injection is successful, you evacuate with the creature and win. Otherwise you hit your own leg with syringe and need to be evacuated yourself - in other words, you lose.

The problem is "interactive" so please use instruction on interactive problems - and particularly the server url from there. GAME-NAME for the url is mad-beaver.

You start the game sending only token as in other similar games. Server initializes the labyrinth, places you and beaver on some different safe spots and announces the first move of the Beaver.

On the next requests you add cmd parameter with one of the four direction values mentioned above. If you want to try catching the Beaver on your move, you can either issue just command Catch or append it to directional command (i.e. North and Catch) - so that you are free to try catching either at your current cell or one of adjacent.

Example

Your request                                    Server responds
~~~~~~~~~~~~                                    ~~~~~~~~~~~~~~~

token: X....Z                                   new_game: yes
                                                Beaver: moves North, now in a safe place

token: X....Z                                   Beaver: moves East, hits a wall, now in a safe place
cmd: North                                      Player: moves North, falls into river, now in estuary

We suggest that you investigate game flow and server responses further on your own rather than placing dull detailed descriptions here. Feel free to ask for clarifications if necessary, though!

You need to login to get test data and submit solution.