Free cookie consent management tool by TermsFeed Policy Generator

source: branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/robocode/ReadMe.txt @ 13019

Last change on this file since 13019 was 13019, checked in by gkronber, 9 years ago

#2069: added necessary robocode files to project to make sure that the robocode problem is self-contained (only a java installation is necessary)

File size: 20.6 KB
Line 
1## ReadMe for Robocode
2
3Updated 06-Mar-2013 by Flemming N. Larsen
4
5Robocode Home Page:
6[http://robocode.sourceforge.net/](http://robocode.sourceforge.net/)
7
8### TABLE OF CONTENTS
9
101.  [What is Robocode?](#what-is-robocode)
112.  [History of Robocode](#history-of-robocode)
123.  [System Requirements](#system-requirements)
134.  [Getting Started](#getting-started)
145.  [Robocode API](#robocode-api)
156.  [Robocode Repository](#robocode-repository)
167.  [Community](#community)
178.  [Challenges](#challenges)
189.  [Competition](#competition)
1910. [Command Line](#command-line)
2011. [Links](#links)
2112. [Reporting Defects](#reporting-defects)
2213. [Feature Requests](#feature-requests)
2314. [Versions](#versions)
2415. [News](#news)
2516. [How to contribute](#how-to-contribute)
26
27### 1. WHAT IS ROBOCODE?
28
29Robocode is a programming game where the goal is to code a robot battle
30tank to compete against other robots in a battle arena. So the name
31Robocode is a short for "Robot code". The player is the programmer of
32the robot, who will have no direct influence on the game. Instead, the
33player must write the AI of the robot telling it how to behave and
34react on events occurring in the battle arena. Battles are running in
35real-time and on-screen.
36
37**The motto of Robocode is: Build the best, destroy the rest!**
38
39Besides being a programming game, Robocode is used for learning how to
40program, primarily in the Java language, but other languages like C#
41and Scala are becoming popular as well.
42
43Schools and universities are using Robocode as part of teaching how to
44program, but also for studying artificial intelligence (AI). The
45concept of Robocode is easy to understand, and a fun way to learn how
46to program.
47
48Robocode offers complete development environment, and comes with its
49own installer, built-in robot editor and Java compiler. Robocode only
50pre-requires that a JVM (Java Virtual Machine) to exist already on the
51system where Robocode is going to be installed. Hence, everything a
52robot developer needs to get started is provided with the main Robocode
53distribution file (`robocode-xxx-setup.jar`). Robocode also supports
54developing robots using external IDEs like e.g.
55[Eclipse](http://www.eclipse.org/downloads/),
56[IntelliJ IDEA](http://www.jetbrains.com/idea/),
57[NetBeans](http://netbeans.org/),
58[Visual Studio](http://msdn.microsoft.com/en-gb/vstudio/) etc., which
59supports the developer much better than the robot editor in Robocode.
60
61The fact that Robocode runs on the Java platform makes it possible to
62run it on any operating system with Java pre-installed, meaning that it
63will be able to run on Windows, Linux, Mac OS, but also UNIX and
64variants of UNIX. Note that Java 6 or newer must be installed on the
65system before Robocode is able to run. See the [System
66Requirements](#system-requirements) for more information.
67
68Be aware that many users of Robocode (aka Robocoders) find Robocode to
69be very fun, but also very addictive. :-)
70
71Robocode comes free of charge and is being developed as a spare-time
72project where no money is involved. The developers of Robocode are
73developing on Robocode because they think it is fun, and because they
74improve themselves as developers this way.
75
76Robocode is an Open Source project, which means that all sources are
77open to everybody. In addition, Robocode is provided under the terms of
78[EPL](http://www.eclipse.org/legal/epl-v10.html) (Eclipse Public
79License).
80
81### 2. HISTORY OF ROBOCODE
82
83The Robocode game was originally started by **Mathew A. Nelson** as a
84personal endeavor in late 2000 and became a professional one when he
85brought it to IBM, in the form of an AlphaWorks download, in July 2001.
86
87IBM was interested in Robocode, as they saw an opportunity to promote
88Robocode as a fun way to get started with learning how to program in
89Java. IBM wrote lots of articles about Robocode, e.g. like
90[Rock 'em, sock 'em Robocode!](http://www.ibm.com/developerworks/java/library/j-robocode/)
91from AlphaWorks / developerWorks at IBM, a series of articles like
92[Secrets from the Robocode masters](http://www.ibm.com/developerworks/java/library/j-robotips/),
93and "Robocode Rumble / RoboLeague".
94
95The inspiration for creating Robocode came from
96[Robot Battle](http://www.robotbattle.com/history.php), a programming
97game written by Brad Schick in 1992, which should still be alive. Robot
98Battle was, in turn, inspired by
99[RobotWar](http://www.robotbattle.com/history.php), an Apple II+ game
100from the early 1980s.
101
102The articles from IBM and the Robocode community behind the RoboWiki made
103Robocode very popular as programming game, and for many years Robocode has been
104used for education and research at schools and universities all over the world.
105
106In the beginning of 2005, Mathew convinced IBM to release Robocode as
107**Open Source** on SourceForge. At this point, the development of Robocode had
108somewhat stopped. The community around Robocode began to develop their own
109versions of Robocode with bug fixes and new features, e.g. the
110[OpenSourceRobocode/Contributions](http://old.robowiki.net/robowiki?OpenSourceRobocode/Contributions)
111and later on the two projects,
112[RobocodeNG and Robocode 2006](http://old.robowiki.net/robowiki?RobocodeNG/Archive), by **Flemming N. Larsen**.
113
114Eventually, Flemming took over the Robocode project at SourceForge as
115administrator and developer in July 2006 to continue the original Robocode game.
116The RobocodeNG project was dropped, but Robocode 2006 was merged into the
117official Robocode version 1.1 containing lots of improvements. Since then,
118lots of new versions of Robocode have been released with more and more features
119and contributions from the community.
120
121In May 2007, the [RoboRumble](http://robowiki.net/wiki/RoboRumble) client got
122built into Robocode. RoboRumble is widely used by the Robocode community for
123creating up-to-date robot ranking lists for the 1-to-1, Melee, Team, and
124Twin Dual competitions.
125
126Since May 2010 a **.NET plugin** is provided for Robocode using a .NET / Java
127bridge, which makes it possible to develop robots for .NET beside developing
128robots in Java. This part was made by **Pavel Savara**, who is a major Robocode
129contributor.
130
131### 3. SYSTEM REQUIREMENTS
132
133In order to run Robocode, Java 6 Standard Edition (SE) or a newer
134version of Java must be installed on your system. Both the Java Runtime
135Environment (JRE) and the Java Developer Kit (JDK) can be used. Note
136that the JRE does not include the standard Java compiler (javac), but
137the JDK does. However, Robocode comes with a built-in compiler (ECJ).
138Hence, it is sufficient running Robocode on the JRE.
139
140Also note that it is important that these environment variables have
141been set up prior to running Robocode:
142
143-   `JAVA_HOME` must be setup to point at the home directory for Java
144    (JDK or JRE). 
145  Windows example: `JAVA_HOME=C:\Program Files\Java\jdk1.6.0_41` 
146  UNIX, Linux, Mac OS example: `JAVA_HOME=/usr/local/jdk1.6.0_41`
147
148-   `PATH` must include the path to the `bin` of the Java home
149    directory (`JAVA_HOME`) that includes `java.exe` for starting the
150  Java virtual Machine (JVM). 
151  Windows example: `PATH=%PATH%;%JAVA_HOME%` 
152  UNIX, Linux, Mac OS example: `PATH=${PATH}:${JAVA_HOME}/bin`
153
154You can read more details from here:
155
156-   [System Requirements](http://robowiki.net/wiki/Robocode/System_Requirements)
157
158If you want to program robots in .NET or control Robocode from a .NET
159application, you need to install the Robocode .NET API plug-in on top of
160Robocode. The plug-in is installed by double-clicking the
161`robocode.dotnet-xxx-setup.jar` the same way as Robocode itself is
162installed.
163
164### 4. GETTING STARTED
165
166Most documentation about Robocode is provided thru the
167[RoboWiki](http://robowiki.net), which contains the official
168documentation about Robocode, but which also hosts the community around
169Robocode. It is highly recommended to read the articles on the RoboWiki
170for getting started with Robocode. These articles are provided from
171here:
172
173-   [Getting Started](http://robowiki.net/wiki/Robocode/Getting_Started)
174
175You should read about the anatomy of a robot, the game physics, scoring
176etc.
177
178To learn more about developing robots for .NET, these articles are a
179good starting point:
180
181-   [Create a .NET robot with Visual Studio](http://robowiki.net/wiki/Robocode/.NET/Create_a_.NET_robot_with_Visual_Studio)
182-   [Debug a .NET robot with Visual Studio](http://robowiki.net/wiki/Robocode/.NET/Debug_a_.NET_robot_in_Visual_Studio)
183
184### 5. ROBOCODE API
185
186The Robocode API is provided as HTML pages for both the Java and .NET
187platform.
188
189-   [Java Robot API](http://robocode.sourceforge.net/docs/robocode/)
190-   [Java Control API](http://robocode.sourceforge.net/docs/robocode/index.html?robocode/control/package-summary.html)
191-   [.NET Robot API](http://robocode.sourceforge.net/docs/robocode.dotnet/Index.html)
192-   [.NET Control API](http://robocode.sourceforge.net/docs/robocode.dotnet.control/Index.html)
193
194The Robocode API actually consists of 3 different APIs.
195
196-   **Robot API**: Within the Java package `robocode` and .NET namespace
197    `Robocode`. 
198    The Robot API is used for developing robots, and is the only part of
199  the API that robots are allowed to access.
200
201-   **Robot Interfaces**: Within the Java package
202    `robocode.robotinterfaces` and .NET namespace
203  `Robocode.RobotInterfaces`. 
204    The Robot Interfaces are used for developing new robot types with a
205    different API that the standard Robot API. 
206    **Note:** *The game rules and robot behaviors cannot be changed.*
207
208-   **Control API**: Within the Java package `robocode.control` and .NET
209    namespace `Robocode.Control`. 
210  The Control API is used for letting another application start up
211  battles with selected robots in Robocode and retrieve the results.
212  It is also possible to get snapshots of robots and bullets (like
213  position, heading, energy level etc.) at a specific time in a battle.
214
215### 6. ROBOCODE REPOSITORY
216
217If you want to try out new robots than the sample robots that come with
218Robocode, you should visit the [Robocode
219Repository](http://robocoderepository.com/).
220
221Robots are available under the
222[Bots](http://robocoderepository.com/Categories.jsp) section of the
223repository.
224
225The Robocode Repository is developed and maintained by David Lynn as a
226project independently of the Robocode project.
227
228### 7. COMMUNITY
229
230The community around Robocode is using the RoboWiki as communication
231channel. At the RoboWiki, people share new ideas, code snippets,
232algorithms, strategies, and lots of other stuff about Robocode. New
233official documentation from the developers of Robocode will be put at
234the RoboWiki as well.
235
236On the RoboWiki, these strategies are provided:
237
238-   [Radar](http://robowiki.net/wiki/Radar)
239-   [Movement](http://robowiki.net/wiki/Category:Movement)
240-   [Targeting](http://robowiki.net/wiki/Category:Targeting)
241
242The code snippets are also provided on the RoboWiki:
243
244-   [Code Snippets](http://robowiki.net/wiki/Category:Code_Snippets)
245
246### 8. CHALLENGES
247
248A good way to improve you self as a robot developer is to try out some
249real challenges. On the RoboWiki, two famous challenges exist for
250testing/studying a robots movement, targeting, and gun abilities:
251
252-   [Movement Challenge](http://robowiki.net/wiki/Movement_Challenge_(original))
253-   [Targeting Challenge](http://robowiki.net/wiki/Targeting_Challenge_(original))
254-   [RoboRumble Gun Challenge](hhttp://robowiki.net/wiki/RoboRumble_Gun_Challenge)
255
256### 9. COMPETITION
257
258If you want to challenge your robot(s) and yourself as robot developer,
259the [RoboRumble@Home](http://robowiki.net/wiki/RoboRumble) is the best
260way to do it. RoboRumble is the ultimate collaborative effort to have a
261live, up-to-date ranking of Robocode bots. It uses the power of
262available Robocoders' computers to distribute the effort of running
263battles and building the rankings.
264
265RoboRumble is actually 3 different rumbles:
266
267-   **RoboRumble** (aka 1v1): One robot versus another robot - both
268    picked at random. These two robots a alone on the battle field.
269-   **MeleeRumble**: Ten robots picked at random all battle against
270    each other..
271-   **TeamRumble**: One team versus another team - both picked at
272    random. Each team consists of five or less robots.
273
274In order to get started with RoboRumble, you should read this page:
275
276-   [Starting With RoboRumble](http://robowiki.net/wiki/RoboRumble/Starting_With_RoboRumble)
277
278Note that the RoboRumble@Home client is built into Robocode and can
279be started using the batch/shell/command files:
280
281|                 | Windows           | UNIX / Linux     | Mac OS                |
282|-----------------+-------------------+------------------+-----------------------|
283| **RoboRumble**  | `roborumble.bat`  | `roborumble.sh`  | `roborumble.command`  |
284| **MeleeRumble** | `meleerumble.bat` | `meleerumble.sh` | `meleerumble.command` |
285| **TeamRumble**  | `teamrumble.bat`  | `teamrumble.sh`  | `teamrumble.command`  |
286
287Two other competitions exists which are:
288
289-   [Twin Duel](http://robowiki.net/wiki/Twin_Duel): Two teams
290    battle on an 800x800 field. Each team consists of two robots
291    (twins).
292-   [Hat League](http://robowiki.net/wiki/Hat_League): Two teams not
293    knowing each other are paired together at random (like drawing
294    names from a hat). Each team consists of two robots. These two
295  teams must work together and defeat two other teams that have also
296  been picked at random.
297
298### 10. COMMAND LINE
299
300It is possible to specify options and predefined properties from the
301command-line when running Robocode. The usage of these can be listed by
302writing this from a command prompt or shell:
303
304    robocode -help
305
306For example, it is possible to:
307
308-   disable the graphical user interface (GUI).
309-   disable security that is specific to Robocode (but does not
310    override the security that comes with the JVM).
311-   enable/disable the debugging mode, useful when debugging robots.
312-   play a battle based on an existing Robocode .battle file.
313-   replay a recorded battle visually.
314-   save the results of battles in a comma-separated file.
315
316You can read more details here:
317
318-   [Console Usage](http://robowiki.net/w/index.php?title=Robocode/Console_Usage)
319
320### 11. LINKS
321
322Links relevant to Robocode are provided on the home page of Robocode:
323
324-   [Home Page of Robocode](http://robocode.sourceforge.net/)
325
326Other links are provided from the RoboWiki - especially for challenges
327and competitions:
328
329-   [RoboWiki](http://robowiki.net/)
330
331The is also a Wikipedia page available about Robocode, which provides
332good links to movement and targeting strategies, competitions, and other
333sites about Robocode:
334
335-   [Robocode on Wikipedia](http://en.wikipedia.org/wiki/Robocode)
336
337### 12. REPORTING DEFECTS
338
339If you discover a defect (bug) in Robocode you are encouraged to report
340the issue as soon as you discover it - the sooner the better.
341
342A bug report should be reported on the [Bugs](http://http://sourceforge.net/p/robocode/bugs//p/robocode/bugs/)
343page on the SourceForge site for Robocode. Each bug report will be
344prioritized among other bug reports depending on its impact on the game.
345
346It will be a great help if you describe how to see or which steps to do
347in order to reproduce the defect. You are very welcome to provide a
348screen shot, source code or anything else that will show the bug. It is
349also a very good idea to write which system and version of Robocode and
350Java you are using.
351
352If you are a registered user at SourceForge (register
353[here](http://sourceforge.net/account/registration/)) you will be able
354to add a "monitor" on your bug report. This way you will be able to
355receive notifications when someone add comments to your report, but will
356also be able to better track the current status of the bug, e.g. when
357the bug is fixed and with which version of Robocode the fix is
358available.
359
360If you are a developer yourself, and have a good idea of how the bug
361could be fixed, you are more than welcome to do so. By fixing the bug,
362you will become a contributor of Robocode yourself. You can learn more
363about how to contribute [here](#how-to-contribute). Note that we accept
364bug fixes under the terms of
365[EPL](http://www.eclipse.org/legal/epl-v10.html).
366
367### 13. FEATURE REQUESTS
368
369If you got an idea for a new feature or improvement for Robocode, you
370are very welcome to share your idea by summiting a feature request.
371
372A feature request should be put on the
373[Feature Requests](http://sourceforge.net/p/robocode/feature-requests/)
374on the SourceForge site for Robocode. Each feature request will be
375prioritized among other feature requests.
376
377It will be a great help if you describe your idea in detail, and how you
378think it could be implemented into Robocode. For example, will it be
379possible to extend an existing feature with your idea?
380
381If you are a registered user at SourceForge (register
382[here](http://sourceforge.net/account/registration/)) you will be able
383to add a "monitor" on your request. This way you will be able to receive
384notifications when someone add comments to your request entry, but will
385also be able to better track the current status of your entry, e.g. when
386the feature has been implemented and with which version of Robocode it
387will be available.
388
389If you are a developer yourself, and have a good idea of how the feature
390could be implemented, you are more than welcome to do so if the feature
391is being accepted. By implementing the feature, you will become a
392contributor of Robocode yourself. You can learn more about how to
393contribute [here](#how-to-contribute). Note that we accept
394implementations under the terms of
395[EPL](http://www.eclipse.org/legal/epl-v10.html).
396
397### 14. VERSIONS
398
399Robocode is continuously under development, and you should be aware that
400three different release types exist for Robocode:
401
402-   **Alpha** version is an unofficial "snapshot" version of Robocode
403    that is under development and not feature complete yet. It is
404  normally provided for the person that has put a bug report or
405    feature request on the tracker for Robocode, which needs to be
406    verified. Alpha versions are not meant to be redistributed at all.
407
408-   **Beta** version is an official release that is considered feature
409    complete, and which intended for everybody to try out and test
410  regarding all new features and changes, but which is also
411  considered "unstable", and might contain some unwanted side-effects
412    due to the changes made to this version compared to the last final
413    version of Robocode. Defects or undesired behaviors should be
414    reported as soon as they are discovered so the issues can be fixed
415    before the final release. Everybody is encouraged to take part in
416    the testing Beta versions of Robocode.
417
418-   **Final** version is (as it says) the final version of a specific
419    and official release of Robocode, and where new features and bug
420  fixes have been tested. Note, that the release will not state
421  "final" on the distribution files for Robocode like it is the case
422  for Alpha and Beta versions.
423
424### 15. NEWS
425
426News about Robocode is put on the blog spot for Robocode. Here it
427is possible subscribe to a RSS feed to receive news about Robocode.
428
429-   [Robocode News](http://robo-code.blogspot.com/)
430
431You can also follow Robocode on Twitter and Facebook here:
432
433-   [Twitter for Robocode](http://twitter.com/robocode)
434-   [Robocode on Facebook](http://www.facebook.com/group.php?gid=129627130234)
435
436The RoboWiki can be followed on Twitter as well:
437
438-   [Twitter for RoboRumble](http://twitter.com/robowiki)
439
440### 16. HOW TO CONTRIBUTE
441
442If you want to contribute to Robocode with e.g. a new feature or bug
443fix, you should read the [Developers Guide for building
444Robocode.](http://robowiki.net/wiki/Robocode/Developers_Guide_for_building_Robocode)
445
446Note that we accept code changes under the terms of
447[EPL](http://www.eclipse.org/legal/epl-v10.html).
448
449There exist no or little documentation about the internals of Robocode,
450and the code base will need to be examined by a contributor in order to
451get an insight of how Robocode is implemented. Thus, it required a
452skilled Java developer to figure out how Robocode is put together.
453
454Robocode is divided into several modules. You can read Pavel Savara's
455blog to get a good overview of Robocode here:
456
457-   [Robocode modules](http://zamboch.blogspot.com/2009/06/robocode-modules-as-in-version-17.html)
458
459Help for Robocode internals can be provided through the [Robocode
460Developers Discussion Group](https://groups.google.com/forum/?fromgroups#!forum/robocode-developers)
461where you can register yourself, and start up a new topic. This is the best
462way of getting information and asking about details for the internals in
463Robocode.
464
465If a contribution is a somewhat small change to involves under 10 files,
466then the preferred way is to provide the contribution as a patch file
467that can be applied to the existing Robocode sources. Otherwise, you can
468be granted a Subversion branch for your work, where you can commit your
469changes. Later, this branch needs to be merged into the trunk be the
470administrators of Robocode and tested carefully. Additional work might
471be done by other Robocode developers to finalize the work.
Note: See TracBrowser for help on using the repository browser.