Attack the Robots!

89 views
Skip to first unread message

Simon Nicolussi

unread,
Apr 12, 2015, 3:31:21 PM4/12/15
to land-o...@googlegroups.com
A fitting bug (or Easter egg?) in Attack of the Robots allows the player
to escape a seemingly hopeless situation by confusing the murderous AI
with an unexpected, irrational action: standing right next to a robot
and suicidally moving to its position makes the robot step aside. It
even works when flanked on both sides, something that should take a
teleport to survive:

A
A@A -> @A

The problem is that a robot picks the move that brings it closest to the
player, but never considers simply staying put. If the player moved onto
the robot's spot, all potential moves are equally advantageous (distance
1), but staying put would be even better (distance 0). The easiest fix
is thus the addition of another direction:

--- robots.lisp
+++ robots.lisp
@@ -1,6 +1,6 @@
(defun robots ()
(loop named main
- with directions = '((q . -65) (w . -64) (e . -63) (a . -1)
+ with directions = '((q . -65) (w . -64) (e . -63) (a . -1) (s . 0)
(d . 1) (z . 63) (x . 64) (c . 65))
for pos = 544
then (progn (format t "~%qwe/asd/zxc to move, (t)eleport, (l)eave:")

--
Simon Nicolussi <si...@sinic.name>
http{s,}://{www.,}sinic.name/
Reply all
Reply to author
Forward
0 new messages