[Home]SoccerRobocode

Robo Home | Changes | Preferences | AllPages

/Chat Part of TacticalTeamSetting

What's this ?

SoccerRobocode is a new game mode for Robocode. In SoccerRobocode there are two teams and one ball. The objective of the game is to put the ball in the enemy goal (just like soccer). The score limit is 300. Your team can score in several ways :

You can perform (regular Robocode actions are valid) :

The Ball

The ball always has 100 energy so it's impossible to kill it. When it hits a wall it will bounce perpendicularly. The ball maintains the score of each team. It's connected to the Captain of each team (by socket)

SoccerBot?

SoccerBot? are regular bots. In addition there are two events that can arrive (you must catch them in onCustomEvent())

After this events the game will stop. A int getSide() methods will tell you where is your home. If getSide()==0 then your home is East wall (all the wall and 40 large) you must put the ball in the West wall else then your home is West and you must put the ball at East

CaptainBot?

Captain are leaders of a team. They receive the following events:

Cool, where can I get it ?

https://robocoderepository.com/BotDetail.jsp?id=1571 Maybe someone can put it on this wiki

Installation

just put the file in your robocode folder and unzip (you may want to copy this folder first to be sure) note that there are no modification of existings files (just new files) You must have RobocodeGLV014 installed (it use it to write the scores) and robocode expanded in a folder. you can also do it manualy (there are path info in the zip file). Basicaly all classes go in the robocode/ directory (the expanded one) except

To run it

Put one ball robot and two team set the inactivity parameter a bit bigger (for me not necessary but I don't know on other systems) Use a bigger map (default seems to be too small).

How do I write a team ?

You must write one (and only one) CaptainBot? by extending the class and many SoccerBot? (you can use the same several time) Please note while there are change you must implement the following methods : public void initialise(): first method called and called only once

public void round(): This methods is enclosed in a while(finishCondition) so you must not have a while(true) (otherwise the game will never finish)

for both Captain and Soccer bot you can't subclass onMessageReceived?() (it's used by the game) but you can subclass onMessageReceivedSoccer?(same parameter) For Captain you can't subclass onDeath() but onDeathSoccer?(same parameter)

Then write a team file as usual The code is commented (I mean what each method does) so you can see what each method does or generate a javadoc

FirstTeam?

It's a basic team (they don't move just firing and go to home when energy goes lesser than 50) It's just there to illustrate (I mean we can implement more powerfull things, it's sure)

Thanks to FootBallDemo (I don't remember the exact name), it gave me the basic idea

Please : if you see english errors correct them

Please share any modifications you do to this code I don't know what should be the terrain size and the limit score (currently 300)

If some people are interested and find this fun (I still need to build a solid bot) I'll run a league (when we think all parameters are ready)

If you have any comments and/or suggestions and/or bug reports put them here. Synnalagma


This is cool! Looks like I'll be installing RobocodeGLV014 and SoccerRobocode this weekend. :-) --Dummy

It doesn't seem to work properly on my computer. I get te following error message:

Perhaps I haven't installed RobocodeGLV014 correctly?? --Dummy

Are you using java 1.4 ? The message about "not scoring" Ball.Ball beacause of no action is normal it don't alter the game. But the main problem of SoccerRobocode is that it's too much complicated to implement a really valid tactics. There's a need of changing some rules so it can become "playable"(that was really a bad english, sorry) --Synnalagma


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited October 29, 2003 13:46 EST by Synnalagma (diff)
Search: