robocode for dummies:
DESCRIPTION
Robocode for Dummies:. Seminar for Participants. An Introduction on Robocode. Overiew :. What is Robocode?. Robocode. The Brainchild of Matthew Nelson A software engineer in the Advanced Technology, Internet Division at IBM - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/1.jpg)
Seminar for Participants
![Page 2: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/2.jpg)
An Introduction on Robocode
![Page 3: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/3.jpg)
![Page 4: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/4.jpg)
The Brainchild of Matthew Nelson A software engineer in the Advanced
Technology, Internet Division at IBM A game that allows players to create and
control a robot in the Java programming language
The goal is to be the last robot standing while being the best scorer.
Simple to learn, difficult to master like chess.
![Page 5: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/5.jpg)
Player must write a Java code that creates a robot that can:MoveShoot at other robotsScan for other robotsHit the walls and other robots
More Sophisticated TechniquesStatistical Analysis, Neural Networks
![Page 6: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/6.jpg)
To help people in learning the Java program while enjoying the experience
To help people in learning programming concepts such as control statements, method declarations, inheritance and event handling.
To sharpen strategic skills For the excitement of competition For prices?
![Page 7: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/7.jpg)
Body - Carries the gun with the radar on top.
Gun - Mounted on the body and is used for firing energy bullets.
Radar - Mounted on the gun and is used to scan for other robots when moved.
![Page 8: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/8.jpg)
![Page 9: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/9.jpg)
![Page 10: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/10.jpg)
![Page 11: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/11.jpg)
•Must be unique in a specific Robocode installation•Advised to be your initials
![Page 12: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/12.jpg)
•Import necessary Robocode classes, including the type of robot you will be using•You can also import any relevant Java classes including the standard Java classes
java.awt.Color; java.util.Random; Event objects of MouseListener, etc.
![Page 13: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/13.jpg)
•Extending the right class determines the features that your robot can have:
•JuniorRobot•Robot•AdvancedRobot•RateControlRobot•TeamRobot
![Page 14: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/14.jpg)
Robot The Robot type where
most users start Like the JuniorRobot,
this class’ methods are blocking calls
Have getters and setters instead of public fields
AdvancedRobot Has non-blocking calls Support for custom
events Can write to the file
system
![Page 15: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/15.jpg)
•Literally, the life of your robot•Majority of the code resides here•The body outside the loop is used to ready the robot, i.e. setting colors, positioning the robot, etc.•The body inside the loop is used for logic that is not dependent on any event and is supposed to be repeated, i.e. moving though the battlefield.
![Page 16: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/16.jpg)
![Page 17: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/17.jpg)
How to win a battle?
![Page 18: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/18.jpg)
StatisticsTotal Score Survival ScoreLast Survivor Bonus Bullet Damage Bullet Damage BonusRam Damage Ram Damage Bonus **1sts, 2nds, 3rds
![Page 19: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/19.jpg)
BreakdownSurvival Score
Each robot that's still alive scores 50 points every time another robot dies.
Last Survivor Bonus The last robot alive scores 10 additional
points for each robot that died before it.Bullet Damage
Robots score 1 point for each point of damage they do to enemies.
![Page 20: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/20.jpg)
BreakdownBullet Damage Bonus
When a robot kills an enemy, it scores an additional 20% of all the damage it did to that enemy.
Ram Damage Robots score 2 points for each point of
damage they cause by ramming enemies.Ram Damage Bonus
When a robot kills an enemy by ramming, it scores an additional 30% of all the damage it did to that enemy.
![Page 21: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/21.jpg)
BreakdownTotal Score
All statistics are added to obtain the total score. The total score will determine the rank of the robot in the battle.
![Page 22: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/22.jpg)
Additional**1sts, 2nds, 3rds These do not actually contribute to
score. But they are shown to indicate how long
the robot survived. They also show the number of rounds the robot was placed 1st, 2nd, and 3rd.
![Page 23: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/23.jpg)
How to win a battle?LAST ROBOT STANDING
The last surviving robot does not necessarily indicates the winner in a battle.
Reminder:The total score is computed by
adding the different statistics of the robot.Even if your robot survived because it
has more energy than the others, if it only saves energy and the other robots killed other robots, they will gain more points.
![Page 24: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/24.jpg)
WallsMoves around the outer edge (wall)
with the gun facing inA simple robot (inherited from class Robot)
A tricky robot; usually lasts the longest in the battlefield with other sample robots
![Page 25: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/25.jpg)
TargetSits stillMoves every time energy drops by 20An advanced robot (inherited from
class AdvancedRobot)
![Page 26: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/26.jpg)
Target
![Page 27: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/27.jpg)
SpinbotCharacteristics
Body Color: Blue Gun Color: Blue Radar Color: Black Scan Color: Yellow
Behavior Moves in a circle, firing hard when an
enemy is detected
![Page 28: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/28.jpg)
SpinbotAdditional Info
Inherited from Advanced Robot Has a damage of 16 Has a maximum speed of 5(in pixels)
![Page 29: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/29.jpg)
RamfireCharacteristics
Body Color: light Gray Gun Color: Gray Radar Color: Dark Gray
Behavior Drives at robots trying to ram them, fires
when it hits them.
![Page 30: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/30.jpg)
RamfireAdditional Info
Inherited from Robot Has a damage from 4 - 16
![Page 31: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/31.jpg)
Trackerbasically locks onto a robot, moves close
to it, then fires when close
![Page 32: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/32.jpg)
Tracker
![Page 33: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/33.jpg)
TrackFirea still robot.; it just tracks and fires at
the nearest robot it sees
![Page 34: Robocode for Dummies:](https://reader033.vdocument.in/reader033/viewer/2022061510/5681308a550346895d966588/html5/thumbnails/34.jpg)
http://robowiki.net/w/index.php?title=Robocode/Scoring
http://en.wikipedia.org/wiki/Robocode
http://robowiki.net/wiki/Robocode/Game_Physics