annotate src/rlm/anti_battleship.clj @ 0:78a630e650d2

initial import
author Robert McIntyre <rlm@mit.edu>
date Tue, 18 Oct 2011 00:57:08 -0700
parents
children
rev   line source
rlm@0 1 (ns rlm.anti-battleship)
rlm@0 2 (rlm.ns-rlm/ns-clone rlm.light-base)
rlm@0 3
rlm@0 4
rlm@0 5
rlm@0 6
rlm@0 7
rlm@0 8 "need a board"
rlm@0 9
rlm@0 10 "need some AI"
rlm@0 11
rlm@0 12
rlm@0 13 "for now start off with two players on a rextangular geometry board
rlm@0 14 (each discrete point on the board is a square)"
rlm@0 15
rlm@0 16
rlm@0 17 "winning stragety should be to find a point that is known to contain the enemy's ship.
rlm@0 18 then just hit every other point on the map ."
rlm@0 19
rlm@0 20 "if it's always possible to find such a point, then whatever player goes second
rlm@0 21 will always win."
rlm@0 22
rlm@0 23 "can the finding of that point be tharwarted by ship layout?"
rlm@0 24
rlm@0 25 "for certain types of boards/fleets --- YES"
rlm@0 26
rlm@0 27 "most basic case is just with one ship that is a single point. then
rlm@0 28 it's just blind luck, with the second player having a slight advantage"