[LRUG] Battleship: Ruby Fight Club

Paul Battley pbattley at gmail.com
Tue Sep 13 05:33:39 PDT 2011


For the benefit of anyone who wasn't at LRUG yesterday, or to whom my
slightly incoherent explanations didn't make sense, here's the plan:

I've put together a game-playing framework for Battleship. What you
need to do is to write a Ruby bot to play it. You can do this on your
own or in a team. At next month's LRUG, we'll have a tournament
(probably a best-of-three knockout, but I'm open to suggestions) and
get the winning teams to talk about their strategy and implementation.

The rules and the framework can be found at
https://github.com/threedaymonk/battleship . The high level
explanation is that you need to implement a class called
[something]Player that implements three methods.

If you cloned the repository before about lunchtime today, check that
you've got the latest changes: I've corrected the game play (to let
players know when they have sunk a ship) and changed the player
interface slightly.

Some of you may be tempted to take advantage of Ruby's dynamic nature
to, er, gain an unfair advantage. Be warned that the class loader and
game world implementation used on the day of the tournament may not be
the same as the one currently in my repository!

We'll be using Ruby 1.9.2 for the tournament.

Paul.

PS - There appears to be an exploration of playing strategies in the
Esperanto version of the Wikipedia page on Battleship - but only in
the Esperanto version, as far as I can tell.



More information about the Chat mailing list