[Home]RobocodeDeathMatch/Development

Robo Home | RobocodeDeathMatch | Changes | Preferences | AllPages

You have real time results? Great! Any chance you could use the same thing to get real time results for normal battles? I think RobotPeer? has something called getStatistics() which looks like it is probably for scores... -- Tango

Any particular reason that everyone always has 400-something energy? Is the idea that a DeathMatchRobot? starts with 500 energy and respawns when he goes under 400 so you can control deaths? -- Kawigi

Issue - Robots who don't directly call execute() never die! I'm thinking we might have to hack RobotPeer? to get that to work correctly, the common denominator is the tick() method in there. If we could do it by extending RobotPeer?, that would be prime, but I'm not seeing the way to do that. -- Kawigi

In my freeze mod i've got the execute() being called from the FreezeBot? class, and individual robots are only allowed non-blocking calls. Seems to work quiet well, although it is restrictive. -- Tango

Actually, I just thought of a way to maybe do this. I'll see if I can get it all working and maybe post it later. Just override all the blocking calls in DeathMatchRobot? and call execute instead of directly calling tick(). Seems to work so far, though (I have to go, though, so no time to really test it:

dm.FirstDeathMatch	32	2	30
dmsample.SpinBotDM	17	1	16
dmsample.TrackerDM	17	7	10
dmsample.MyFirstRobotDM	13	3	10
dmsample.CrazyDM	0	1	-1
dmsample.WallsDM	3	6	-3
dmsample.TrackFireDM	3	9	-6
dmsample.FireDM		0	7	-7
dmsample.RamFireDM	2	11	-9
dmsample.SittingDuckDM	0	9	-9
dmsample.TargetDM	0	12	-12
dmsample.CornersDM	0	19	-19
I'll also post the DM sample bots. -- Kawigi

The idea is to have bot with 500 and died with 400 energy. This has a cost (actually but it can be fixed with the server) is that the onRobotDeath? method is never called. Also onDeath(robocode.DeathEvent? is not called but onDeath(void). You can't subclass RobotPeer? just because it is "constructed" by the game (and polymorphism don't work on constructor). Hacking RobotPeer? is too much work just because even if we decompile it is very hard to have no bug. Happy to see that FirstDeathMatch? can beat sample bots... Please post suggestions.

Overriding all blocking call will be the easiest way, fo sure (but very few bots are using blocking calls, or maybe I'm wrong).

I'm just thinking about something. If someone could have a internet server on which we can run the server we could have total online result (but need to fix some things before.

I'm still looking for someone who can made a "position graph" (just send a JPanel subclass). Thanks in advance.

--Synnalagma

Where did you post the sample bots ? or you can email them to me at synnalagma__AT__hotmail.com so I put them in the package and i can use them for testing.

Just another questions how should be the final scoring. I propose something like :

I need them to know how should go multiple round battle.

--Synnalagma

The problem with the RobotPeer? being created by the game was the challenge I saw to doing it that way. It would still require hacking at something else in some way or another. But by forcing calls to execute() rather than directly to tick(), I think we may solve the problem. A lot of bots use blocking calls (including probably all the sample bots, of course), but the concern is that even more don't call execute(). If you look at my bots on the repository, I think FloodHT and SpareParts are my only ones that call execute(). A lot of bots just turn their radar and basically depend on the fact that after robocode calls your run method, it calls tick() repeatedly. I also put in code to account for this (basically just call execute() infinitely after the call to runDeathMatch(). This should prevent those bots from being semi-invincible, but I haven't tested it (I should test it by making a DM version of FloodMini).

I haven't posted my version of DeathMatchRobot? and the dm-SampleBots yet, I will soon. Had to go to a class earlier, so I was interrupted while testing it.

As for the Graph, I can do that (it would be more likely to extend Canvas than JPanel, but unless you want to add additional components to it, that shouldn't make a difference). What do you want it to do/look like? Should it show the progression of scores in the current round, or progression of final scores over several rounds? Should it animate to show the scores over time (i.e.- have it update at regular time intervals) or should it just make a new frame when someone scores? If it's based on time, should the time intervals be relative to real time or relative to robocode time (in ticks)?

Another idea with multi-round scoring is to use the average of places the robot has atained. If a robot always ends up in first or second place, for instance, this golf-ish score would be around 1.5. If the robot were FhqwhgadsMicro, the average placement would be the number of bots in the battlefield.

With an online server, aren't the results still dependant on battles run locally on some computer? Multiple people could be running battles and you probably wouldn't just want an app to display what everyone's running, I would think. I guess I don't get what you're getting at there. -- Kawigi

Online server is not a good idea (I was just imagine a crazy thing). For the grapher the bettest would be with a TableListener? (so we could just add a listener to the TableModel?). Two graph would be cool (I'll do two Table) one for current round and other to global.

And what about scoring the a percent index based on the kill (like myKill/totalKill) or maybe something with difference.

--Synnalagma

An online server could work, you could have the server give each local computer a number which it sends in with all the messages, and then you could have all the games independant, with just the scores being merged. I've no idea how to do it, of course, but it could work. -- Tango

Looks like my version of DeathMatchRobot? works for FloodMini, too. One more question - you commented out the line

	//this.onDeath(new robocode.DeathEvent());
Did it give you issues at runtime? Is there any way we could make a DeathMatch substitute so we can know when we died? Maybe also include the name of the robot who was awarded the kill? -- Kawigi

Ok, also added waitFor() to DeathMatchRobot?. I might want to look closer and make sure I covered all the calls to tick() later. In the meantime, I put the dmsample bots (in a zip file) as well as my new DeathMatchRobot? up at http://students.cs.byu.edu/~kawigi/robots/ so you guys can try it out, too. -- Kawigi

I had some problem at runtime but I could fix them. I will do a new event extending DeathEvent? so it will be compatible without any changes. But the problem is the onRobotDeath? that never appears and if I can fix it we can very simply add a frag limit in place of time limit (or maybe both). I think I must go through the server for this and it can slow down the game (Just because each DeathMatchRobot? must have a thread that listen on the socket) and I'm not sure that all robot will receive the event at the time. If you have another idea on how to do it... -- Synnalagma

Might be worth a shot though. The advantage of that is that the server can be used to specify the type of battle (time or deaths) and what the limit actually is. And maybe it won't be that much of a time hit - it won't be actively sending data much more than it's receiving, just needs to send a notification when it receives one, and also a term signal. The other option is to somehow get this information from the battle, but that might just completely be off. -- Kawigi

I've got a sort of makeshift grapher for it now that works ok with the current table. I'll probably send you what I have later today sometime. -- Kawigi

Cool !!! I have done support for multiple round. Now there is a simple interface for the DMTableModel? that you might want to use only two methods : tableChanged(DMTableModel? dmt) and tablefinished(DMTableModel?) (called at the end of a round). I put the new version. Tell me what you think. (The set Time button don't actually work). -- Synnalagma

Current release is totally functional (I think). Check it ! --Synnalagma

Wow. This is awesome. I've been trying to convert Cake to DM, but its code is currently awful; it would take me a while to convert it. I do have a few suggestions though. The stop button in Robocode doesn't actually stop the match; the bots just start going berserk and continually respawning. You could program them to detect a continuous 5 energy drop and not respawn anymore. Also, it might be a good idea to modify the getEnergy() method to account for the extra 400 energy; this would make it easier for melee bots to convert over to normal bots. -- Vuen

I know the problem about aborting the battle but I don't know how to handle it. I just saw that there's a problem : ramming and wall suicide ar not counted as death (in fact the last robot that hit is counted has the killer). I must fix that (that's why dmsample.RamFireDM? does so poorly). I'll fix also the getEnergy() method. Then we can make a first competition. -- Synnalagma

It also seems that robots that don't do anything until they see something never see anything. Watch bots like TrackFireDM? for instance - after it dies, it doesn't do anything but fire at robots that run into it for the rest of the game. It seems to just spin the gun and not see anyone. Not sure what the root of this problem is though.

With the grapher thingy, how do you want it displayed? When I was messing with it, I just made it a new window, we could do that, or we could stick it next to the tables, what do you want to do? -- Kawigi

For the grapher a new window should be better. I'll see for the bot. --Synnalagma

All is now fixed (bots are running normally) the result show clearly this. you can see the first results here : http://www.geocities.com/synnalagma/firstcompetition/FirstCompetition.html (Generated by the server). Since I'm not a really good graphist, it's not incredible....

You can see that RamFireDM? is doing pretty well, that reflect the fact that agressive strategies are well paid.

Here the points are allocated this way, the classement is done by comparing frags (that's the point normally used in formula 1, rally...).
PlacePoints
110
28
36
45
54
63
72
81
below0

In some Serious Sam mods you earn point when you frag based on the time the victim was alive, the number of bots the victim frags (and the gun it took). This can be a good idea here.

-- Synnalagma

Some possible mod idea (DOOMify it!). Create a bot named EnergyPack?, which will spawn in random (or maybe not random) times somewhere close to battlefield center (since normally you'd want to avoid the center). That special bot would not shoot nor move, but when rammed it'd die and give you energy bonus (like +25 or so :) Should be easy to add it, since you already have onHitRobot?() modified -- Frakir

I like it! Make a class called "PowerUp?" and then you can have EnergyPack? extends PowerUp?, RapidFire? extends PowerUp? (peer.setGunHeat(getGunHeat()-1) in the while(true) loop), etc. -- Tango

This things are great but maybe a little bit too complicated (not to add to the current mod but to program a bot that play with it). First I want to see if some people around want to port their bot to the current mod, so we can a real competition. But the idea of a Chaos mod (like in quake 2) is great. Maybe we can go more in this idea with differents gun (only 3 fire bullets, rapid fire but low energy, gun that heals you when you hit (like 5*firepower)... other you want to add). But the main thing is to see how to make something that keep the simple part of robocode. -- Synnalagma

Power ups? 2 words for you - "Quad damage" -- Kawigi

Or maybe, regeneration, invisibility (that's cool), armor... -- Synnalagma

Yup, oh, and don't forget Quad Damage. ; ) -- Vuen

Ooo! Invisibility! I hadn't thought of that. Easy enough to do, although you would have to force people to use onScannedRobotDM?(). -- Tango

There's a problem with this bonus bot, if you hit it, you will receive 3*firepower energy bonus (since it's not moving is very easy to hit). Have also to fix this. this mean onBulletHitDM?(...), another method to change.

I have to make a choice and I'd like to know your opinion, there are 2 possibilties :

A suicide is, actually equivalent to -1 frag +1 death in the total count. So what do you think ?

-- Synnalagma

You could have a "disabled" setting on 400 energy, like in the normal robocode. It wouldn't be easy to do, but would be good if you could get it. (I've got something similar in the FreezeMod, all i do is check the frozen boolean before handing control over to the round() (like run()) method each turn.) -- Tango

What disabling at 400 would probably entail is overriding the movement and firing methods and make them do nothing if you're "virtually disabled". -- Kawigi

Hey Synnalagma, check your email for the source code to CoopRobot; it shows how to modify the events without having to force the user to change their names. -- Vuen

Could you email that source to me (thomas AT vcarter DOT freeserve DOT co DOT uk), so i can use it for the FreezeMod i'm doing? I haven't had a chance to work on it for a few days, but i hope to get some work done on it over the weekend, and not having to change all the methods would be extremely useful. Thanks in advance. -- Tango

You can find some basics idea here : TipsToMakeAMod contain the code to avoid redefining methods (basic idea). Hope to see soon your RobocodeFreeze. -- Synnalagma

Oops, guys I screwed up the package in the source code zip file; the zip should go in package coop inside robots. I'm sure you figured that out by now, but, I figured I'd mention anyway. My bad... -- Vuen

I think we need to add a "fun" status window into RobocodeDeathMatch - come up with about 10 creative ways to say that BotA? killed BotB? or BotA? killed itself and stick them in there whenever there's a kill, and also notify about things like killing-sprees and stuff. Could be a TextArea?, or even something more creative. Speaking of creative, I need to talk to you about that grapher sometime, Synnalagma... -- Kawigi

I like that idea Kawigi, but perhaps we should allow the bots themselves to select the quote - ie have some function or array with the quotes in that the bots can rewrite, ie a function something like public String getKillQuote?(String deadbotname). Of course perhaps in future releases a swear filter would be needed, but woulnt it be cool to have "Quantum killed DT by mistake" or "Quantum just got medieval on DT". Hehe -Wolfman

There is actually some such "say" functionality built in but not used in Robocode. But some taunts might be fun ;-) -- Kawigi

I like that idea. Could you explain this "say" function that you say isn't used? -- Tango

Well, it's just this partially implemented thing I think they originally thought would be cool but then decided against. Basically there is a public void say(String text) in the RobotPeer? class. Not sure if it does anything useful. Assuming that it hasn't been connected to the game anywhere, it probably doesn't give us anything useful. On the other hand, there's a chance that it's partially implemented in such a way that it would be easy to plug in functionality for it. -- Kawigi

Sounds worth having a look at. I'll go and see what you're talking about while i wait for the moon to disappear. -- Tango

I'm trying to test say() and i'm having a problem. I've altered EnergySetter? to do it, because you can't access it from a robot otherwise, and i've made a class called SpeakTester? which my bot extends (my bot is empty), SpeakTester? is in the robocode package, and has a line "EnergySetter? es=new EnergySetter?(peer)" (pretty much exactly what is in DeathMatchRobot?). SpeakTester? compiles fine, but when it comes to compiling the actual robot, it says that peer cannot be accessed here... i can't see any difference between mine and DeathMatchRobot?, yet DM works fine, and mine doesn't. Any ideas? (if you want, i'll put the sourcecode somewhere) -- Tango

Um, the only thing I can think of is, make sure when its compiling that it's not looking in robocode.jar for the files, but rather in what you extracted. ...That's basically all I can think of off the top of my head. -- Vuen

Are you saying that if you SpeakTester? works if it's in the robocode package but not if it's a separate robot? That should be the case. Bad things would happen if you could access the peer directly from a general robot. You will need to add that method (to call say in RobotPeer?) in your robot mod class in the robocode package. -- Kawigi

SpeakTester? is in the robocode package and compiles fine. Speaker is in the tango package and extends SpeakTester?. Speaker is completely empty (the run() method is all in SpeakTester?), but when it compiles it brings up an error message in SpeakTester?. -- Tango

Wow, cool idea here !! It would be possible to add a new window, but I think it would be cool to have only one on the server (otherwise it may slow down the game). Then your text will only appear when you died or when you frag some bot (of course better).

I have made a new version with much better code (sometimes the connection was not closed properly and it show some bugs in the futur round/battles). there are also other new things like options, help, new Comparator and oters, just check RobocodeDeathMatch/ChangeLog for more. The greatest thing is that it doesn't override any onXXXEvent() but you still can't override run() (but runDeathMatch() otherwise there's a security error, I think robocode must check the package of the object calling socket operation, if it's called from robocode package, there's no problem).

I also run a new season (check help for rules or RobocodeDeathMatch/Participant).

--Synnalagma

The built in say() method that i can't get to work looks like it will display the text on the battlefield, at the location of the robot that's speaking. -- Tango

I've just gone back to this, fixed the problem (added "robocode." to the extends bit, it was looking at the wrong version), and it all works. It prints your bots name and then whatever you want to say, centered on the center of your bot (eg. "Speaktester: Hello"). If anyone wants more info, i will sort out a proper "mod" to allow bots to use it, and you can look at the code. -- Tango

To Kawigi, it will be difficult to talk since I don't have an internet connection (Finished my work) and I must go to university (I don't go often since I just have finished it also...) so write me an email at synnalagma__AT__hotmail.com --Synnalagma

I have done the message panel all I need is some cool idea for message (like botA kill botB). Since i'm not a good english speaker, it's too hard for me to invent them please post your suggestions in the table bellow. Actually, the layout of the is as follow : Botname : \n message (like botA kill botB) where botName is the sender of the message (actually the killer). This will also allow another function chat(String) once a tick(maybe once 50 or 75 ticks). Currents implemtation is done by JList supporting html.

User Suggested message
Synnalagma botA sent botB to heaven
Kawigi botB bit botA's bullet
botA 0wn3d botB
botB was botA's clay pigeon
botB's chassis was punctured by botA's bullet
botA smacked down botB
botB ate a bullet and botB sandwich
botA made Swiss cheese of botB's chassis
botA put botB into therapy
botB was sacrificed to botA's roboGod

Feel free to add any idea. Note that this will be the default but bot can override String getKillMessage?(String victim).

--Synnalagma

Threw a few random ideas in there. Feel free to improve them. Another idea for messages to send to the server is if a bot gets several kills without dying. For example (this is mostly just copied from Unreal Tournament, with some 'poetic license'):

5 Kills <bot name> is on a killing spree!
10 Kills <bot name> is on a rampage!
15 Kills <bot name> is dominating!
20 Kills <bot name> is unstoppable!
25 Kills <bot name> is SandboxDT-like! (in Unreal it's Godlike)

Also, if a bot kills 2 bots within a short time period, it's a "Double Kill", kill a third bot within a short time and it's a "Multi Kill", a 4th bot makes it an "Ultra Kill" and a 5th makes it a "Monster Kill". I guess the new version of the game inserts "Mega Kill" for 4 quick kills, and scoots the last two up one. Just some suggestions that might be fun. -- Kawigi

I just have tested to port some open source melee bot Rapture and ArtOfWar? it worked fine (I just have changed main file extends DeathMatchRobot? and renamed run() to runDeathMatch(). If you know some other open source melee bot to test... -- Synnalagma

I like your killing spree ideas, it would be very funny to see "SandboxDT is SandbotDT?-like!". ;-) -- Tango

Feel free to test with Cake. I was trying to make a DeathMatch version the other day, but I couldn't manage to quickly change it and still keep the original; soon enough I'll have a DeathMatch version within the same package as the original version as well as CupCake?. There's just quite a bit of code to change to make Cake work this way. -- Vuen

Hey Synnalagma, what happens if you give the robot some random coordinates that are far outside of the battlefield? If possible, my suggestion is to add a delay of say 50 or 100 ticks or so before a robot respawns instead of making it respawn immediately; you could simply give it some large random negative coords (say -150,-150), make the robot call stop(), and hold the robot's blocking calls and events until its respawn time is up. This would give it some delay before it respawns. I think this is a good suggestion; it actually gives some incentive for the bot to not die. -- Vuen

I intend to have something like that in the next release of the PowerUpMod, it will probably be the next thing I do. I haven't done any testing yet though, so i don't know. I would advise making the coords futher away than (-1000,-1000) so you can be sure the bot won't be scanned. -- Tango

Yeah, it was funny to see Vuen say "large random negative coords (say -150,-150)," as if those were the largest negative values he could come up with off the top of his head :-p -- Kawigi

*grin* I suppose I do have a limited imagination when it comes to large values :D. Avoiding scans is not a problem for RobocodeDeathMatch, since you can just program DeathMatchRobot? to not allow scans of dead robots to the robot; however with PowerUpMod you may wish to make something like -2000,-2000 since a radar has distance 1200. -- Vuen

You're forgetting your maths. The closest a robot can get to large negatives like that is (0,0) so using pythagoras sqrt(1000^2+1000^2)=sqrt(2000000)=1414.214>1200 so all is well. :-) I am going to have to investigate the robocode messaging system sometime soon, because i need more communication than ScannedRobotEvents? can give... If i've got that set up, then i should be able to get PowerUpRobots? to ignore PowerUps? when they are offscreen. (or, i could just find out the coords using sin and cos and if they are -ve, remove it from the events vector - much easier...) -- Tango

I like the idea of sending out of the battle field dead robot for 50 ticks, i'll do it. Just have found something interesting for you Tango. In the robocode package the normal classloader is used this mean that static field are shared between all robots. This mean you can do communication using static field and not socket. I have tried it. the problem is that it slow the game. I have to implement it using a separate thread, but then the thread is given to a certain bot (and the game try to interrupt it when the robot die). This is also unfair to the bot since is has one Thread already in use (if I remember you are allowed to run 5 threads).

Nevermind, soon there will be a new version with message support and no immediate reapperation.

Vuen Did you tried to just extends Cake with DeathMatchRobot? ? I'm curious about what it can give. Rapture is not so good (but doesn't crash). TheArtOfWar crash some times, is this normal ?

-- Synnalagma

Oh I'm sure extending DeathMatchRobot? would work; the problem is I'd have to replace a second .jar with the DM version of Cake in it. What I want is to be able to pack Cake in all 4 modes (CoopRobot, PowerUpMod, DeathMatch, and CoopRobot Droid) in one package. This means I need the framework of the bot to be isolated from the robot itself so that all robots can use the same framework. However, after considering the interface implementation, I think instead I'll isolate methods in the Cake class within a different class, and just make all its class files refer to TeamRobot instead of Cake. That way all 4 modes can just instantiate the rest of its framework and it won't have to know the difference. -- Vuen

Just check out new version for all of this stuff. Check also the RobocodeDeathMatch/FunStuff page and add your own message. --Synnalagma

I have done a small hack that permit to modify a .class file (using bcel library). So i could port any bot on RobocodeDeathMatch. Of course, SandBoxDT? is the best. The program only set the superclass to DeathMatchRobot? and rename the run methods to runDeathMatch it work. Still have to make some test, but soon any bot will be able to enter the competition. I don't know if it's correct to do that so I won't release it for now. --Synnalagma

I'm now doing a small site in php that wil allow online result (as RoboRumble). But for this I need a new ranking system (point don't work for this, because it require kind of season mode). Have-you any idea ?

Founded some bugs in the latest version i'll fix it.

--Synnalagma

Now RobocodeDeathMatch has it's own online result see http://membres.lycos.fr/robocode a complete wiki. Go to BotManager? and add your bot (all bots accepted). --Synnalagma


Robo Home | RobocodeDeathMatch | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited December 12, 2003 22:34 EST by Tango (diff)
Search: