The three rules of Ruby Q.:
Please do not post any solutions or spoiler discussion for this quiz
48 hours have passed from the time on this message.
Support Ruby Q. by submitting ideas as often as you can:
by Simon Kroeger
RRobots, Inc. is always looking for new talented pilots. Recently they
many skilled employees in a show battle against one of their competitors
they decided to try something new.
Don’t be afraid, you don’t have to lead a robot into the fight
RRobots, Inc. is asking you to write an AI for one of their bots. You
provided with a programming interface and as many shiny new robots as
need to test your creation.
All bots have a body equipped with a powerful engine and robust plating,
capable of firing energy bullets of various strengths, and a radar to
battlefield for enemy bots.
Battles take place in an arena, 1600m by 1600m, each robot is placed at
randomly chosen position and powered on simultaneously. For this test
fights are one-on-one, so if you scan something it will be your
RRobots, Inc. will run a championship competition on 12-20-2005 (wasting
more hardware) matching each participant against all others, three
bot must be posted to Ruby T. on or before 6 PM (GMT) the 19th, to
resubmission of the same bot class replaces the original submission, but
contestants are allowed to submit multiple distinct bots.) The winner
competition will be the bot with the most overall wins. The result of
battles will lead to a winner honored with having the next product-line
after him. (James and Simon will provide the winner with a Desktop R/C
Mini-Rover from ThinkGeek.com, after the quiz summary is posted.
must provide a valid email address with their solutions to be eligible.)
If you are interested, here are the details:
You have to provide a class including the module ‘Robot’, defining a
named ‘tick’ taking an array of events as input. By including the
‘Robot’ you gain access to the robot hardware via methods like:
fire(power) # fires a bullet in the direction of your gun turn(degrees) # turns the robot (and the gun and the radar) energy # your remaining energy (if this drops below 0 you are
You have to define the behavior of the robot for each tick
This approach is kind of low level but you are allowed (if not
unleash the whole power of Ruby to create higher level functions and
(take a look at http://rrobots.rubyforge.org/OOSittingDuck.rb for an
A word of warning: If your AI tries to cheat (using other ways than
provided by the ‘Robot’ module to gain information about the battlefield
other bots) or throws any errors, your submission will be disqualified.
You can get information, sample bots and the arena program on
Good luck and may the best bot win!
Disclaimer: Of course there is no ‘RRobots, Inc.’ (if there is, this is
unrelated to them) and you will not receive any hardware whatsoever via
mail. While it is very unlikely that you get hurt in a RRobots battle,
responsible for any harm done to you or your equipment during this quiz.