Difference between revisions of "Robocode/Learning from Robots"

From Robowiki
Jump to navigation Jump to search
m (Image: Shows how to extract a robot by selecting "Extract downloaded robot for editing" in the File menu of the Robot Editor)
m (Add spacing)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page suggest that you learn from other robots by [[Robocode/Downloading Robots|downloading]] and examining the source code of robots.
+
By now, you should know how to create robots with the Robot Editor. If not, you should follow the [[Robocode/My First Robot|My First Robot Tutorial]] first. You will also want to look [[Robocode Documentation|at some tutorials]] as well.
  
== Learning from other Robots ==
+
Eventually, though, you'll want to learn by examining code written by others. Some authors graciously include the source to their robots, and you can examine these robots using the '''Extract downloaded robot for editing''' tool, in the Robot Editor:
By now, you should know how to use the Robot editor and create robots. If not, you should follow the [[Robocode/My First Robot|My First Robot Tutorial]] first. You will also want to look at some tutorials.
 
  
Eventually, though, you'll want to learn by examining code written by others. Some authors graciously include the source to their robots, and you can examine these robots using the '''Extract downloaded robot for editing''' tool, in the Robot Editor.
+
[[Image:ExtractRobot.png|Shows how to extract a robot by selecting "Extract downloaded robot for editing" in the File menu of the Robot Editor]]
 +
 
 +
 
 +
Select the robot you want to extract:
 +
 
 +
[[Image:RobotExtractDialog.png|Shows the dialog used when extracting a robot, where the user must choose which robots to extract]]
  
[[Image:ExtractRobot.png|Shows how to extract a robot by selecting "Extract downloaded robot for editing" in the File menu of the Robot Editor]]
 
 
Simply select the robot you want to extract...
 
  
http://robocode.sourceforge.net/help/learning/extractdialog.png
+
Then click '''Extract''' to extract the .jar to the <code>robots/</code> directory:
 +
 
 +
[[Image:ExtractResults.png|Shows a dialog which prints out information about the progress and results of extracting a robot]]
  
Then click '''Extract''' to extract the .jar to the robots directory..
 
  
http://robocode.sourceforge.net/help/learning/extractresults.png
+
The files in the robot will be extracted to <code>robocode/robots/<package name path>/</code>. You can look at them in the Robot Editor:
  
As you can see, the files in this example were extracted to C:\robocode\robots\rapture\. You can now open them up and look at them in the Robot Editor:
+
[[Image:RobotEditorOpen.png|Shows the Open File dialog for the Robot Editor where the user can select which files to open in the editor]]
  
http://robocode.sourceforge.net/help/learning/fileopen.png
+
== See also ==
  
== See Also ==
+
{{RobocodeDocsList}}
* [[Robocode/Downloading Robots|Downloading other Robots]]
 
* [[Robocode/Getting Started|Getting started with Robocode]]
 
* [[Robocode/My First Robot|My First Robot Tutorial]]
 
* [[Robocode/FAQ|Frequently Asked Questions (FAQ)]]
 
* [[List of articles about Robocode]]
 
  
 
[[Category:Robocode Documentation]]
 
[[Category:Robocode Documentation]]
 +
__NOTOC__

Latest revision as of 21:39, 6 September 2017

By now, you should know how to create robots with the Robot Editor. If not, you should follow the My First Robot Tutorial first. You will also want to look at some tutorials as well.

Eventually, though, you'll want to learn by examining code written by others. Some authors graciously include the source to their robots, and you can examine these robots using the Extract downloaded robot for editing tool, in the Robot Editor:

Shows how to extract a robot by selecting "Extract downloaded robot for editing" in the File menu of the Robot Editor


Select the robot you want to extract:

Shows the dialog used when extracting a robot, where the user must choose which robots to extract


Then click Extract to extract the .jar to the robots/ directory:

Shows a dialog which prints out information about the progress and results of extracting a robot


The files in the robot will be extracted to robocode/robots/<package name path>/. You can look at them in the Robot Editor:

Shows the Open File dialog for the Robot Editor where the user can select which files to open in the editor

See also

Robocode API

Beginner Guides

External Editors

.NET Robots

Links