Difference between revisions of "User:D414"

From Robowiki
Jump to navigation Jump to search
(Add table to show incorrectly documented event priorities)
Line 1: Line 1:
= Personal Gotchas =
+
{{Navbox small
== Event Priority ==
+
| title        = Sub-pages
The documentation for event priorities is unclear. [https://robocode.sourceforge.io/docs/robocode/robocode/AdvancedRobot.html#setEventPriority-java.lang.String-int- setEventPriority] says lower values are higher priority while [https://robocode.sourceforge.io/docs/robocode/robocode/AdvancedRobot.html#getEventPriority-java.lang.String- getEventPriority] says higher values are higher priority. Testing confirms the later is correct.
+
| page1        = Personal Gotchas
 
+
}}
The documentation also has errors for the default priorities for several events.
+
= About Me =
 
+
I was first introduced to robocode in around 2010 as part of my undergraduate computer science course. For our class competition I wrote a simple melee bot using minimum risk movement and a buggy linear targeting gun which came second overall. I've been fascinated with robocode ever since but a combination of lack of time (and dislike of Java) has kept me from writing anything more serious or entering the roborumble. I'm hoping 2024 will be the year that changes.
{| class="wikitable sortable"
 
|-
 
! Event !! [https://robocode.sourceforge.io/docs/robocode/robocode/AdvancedRobot.html#setEventPriority-java.lang.String-int- setEventPriority] docs !! [https://github.com/robo-code/robocode/tree/VER_1_9_5_2/robocode.api/src/main/java/robocode Source Code (1.9.5.2)]
 
|-
 
| RoundEndedEvent || 100 || '''110'''
 
|-
 
| BattleEndedEvent || 100 || 100
 
|-
 
| WinEvent || 100 || 100
 
|-
 
| SkippedTurnEvent || 100 || 100
 
|-
 
| StatusEvent || 99 || 99
 
|-
 
| Key and Mouse Events || 98 || 98
 
|-
 
| CustomEvent (Default) || 80 || 80
 
|-
 
| MessageEvent || 75 || 75
 
|-
 
| RobotDeathEvent || 70 || 70
 
|-
 
| BulletMissedEvent || 60 || 60
 
|-
 
| BulletHitBulletEvent || 55 || 55
 
|-
 
| BulletHitEvent || 50 || 50
 
|-
 
| HitByBulletEvent || 40 || '''20'''
 
|-
 
| HitWallEvent || 30 || 30
 
|-
 
| HitRobotEvent || 20 || '''40'''
 
|-
 
| ScannedRobotEvent || 10 || 10
 
|-
 
| PaintEvent || 5 || 5
 
|-
 
| DeathEvent || -1 || -1
 
|}
 
 
 
== Execute Method ==
 
The documentation for the [https://robocode.sourceforge.io/docs/robocode/robocode/AdvancedRobot.html#execute-- execute] method says that it '''must''' be called otherwise set* methods will never be performed. This doesn't seem to be strictly true as a robot that uses set methods to spin its radar, gun and body in the [https://robocode.sourceforge.io/docs/robocode/robocode/Robot.html#run-- run] method will spin even without calling [https://robocode.sourceforge.io/docs/robocode/robocode/AdvancedRobot.html#execute-- execute].
 
== Skipped Turns ==
 
The documentation for [https://robocode.sourceforge.io/docs/robocode/robocode/SkippedTurnEvent.html SkippedTurnEvent] says a robot will be removed from the battle after skipping 30 turns however a robot using the example code will skip many more turns than this without being removed from the battle.
 

Revision as of 04:37, 6 February 2024

Sub-pages:
Personal Gotchas

About Me

I was first introduced to robocode in around 2010 as part of my undergraduate computer science course. For our class competition I wrote a simple melee bot using minimum risk movement and a buggy linear targeting gun which came second overall. I've been fascinated with robocode ever since but a combination of lack of time (and dislike of Java) has kept me from writing anything more serious or entering the roborumble. I'm hoping 2024 will be the year that changes.