[Home]CoopRobot/Chat

Robo Home | CoopRobot | Changes | Preferences | AllPages

I moved the discussion here, because I'm going

Sounds great! :-) Might stir up some interest in team bots if people don't have to start from scratch. Good luck! -- Tango

There could be a problem with editing... I did not edited the page, but Tango did it... anyway in "changes" it's listed as mine -- Simonech

Sorry. I was logging on from college, and forgot that it's only my home computer that has the cookies set up to remember my name. -- Tango

It would be really great to have a framework like this. What about making it as an open source project ? --Synnalagma]

Would the CoopRobot translate received scans for the other robot? A ScannedRobotEvent isn't as useful if its relative to unknown x and y coordinates and heading. -- Kawigi


That's something I thought manu times, and I would even take the idea further. Right now teams are light-years away from other bots, so the easier way to make a good team is to just package a bunch of good melee bots not shoting each other. It would be cool to create a bot that fires and moves in an standar way (ie. you just tell the bot which enemy to target, and each x ticks tell him where to move). It would force people to develop teams that win because they have good team tactics (just because gun and movement would be the same for everyone)... -- Albert

I'm not sure i understand you... would the bot just have a goTo(x,y) and a shoot(x,y), controlled by messages, and everything else would be done by the leader? -- Tango

All of this worked before, and everything was done automatically. You change Rapture to extend CoopRobot instead of AdvancedRobot, and you literally created a droid version of it like this:

 public class RaptureDroid? extends Rapture implements Droid {}
And that was it; the CoopRobot class handled everything, and onScannedRobot worked exactly as if you had a radar spinning around; CoopRobot automatically translated teammate scans and created ScannedRobotEvents? for them relative to your robot. It's unfortunate that this was lost because everything was already working, and I had actually done this with several open source bots. You wouldn't believe how cool it looked to have droid versions of bots like Rapture and Wolverine created this easily and working together. This is why I want to rebuild this. Give me about a week or so; I have my last midterm tomorrow and no major outstanding assignments so I should have some time soon to rebuild it. -- Vuen

I assume you have to extend CoopRobot, not rapture... -- Tango

No, the droid version of Rapture simply extends Rapture. The CoopRobot class will automatically known that it's a droid and synthesize scans for it. Absolutely no code is needed in the class; hence the closed braces. -- Vuen

Of course, Rapture has been changed to extend CoopRobot. -- Kawigi


Qohnil's CooperativeRobot? is still available at the RobocodeRepository:
http://robocoderepository.com/BotDetail.jsp?id=622

Yes; however, Qohnil's CooperativeRobot? class is not easily setup, and you have to change a lot of stuff in both the robot and the class to implement it. And you still need to program your bot for things like not shooting teammates, so there's not much point to the whole thing afterall. What it does do however does work well, but it wasn't very popular because it required a lot more work to install than people wanted at the time.

I've been on the drawing board a lot of the past couple days on this CoopRobot thing, and I think I can rebuild it a lot better than it was before. The old one used to require you to change run() to go() and onScannedRobot() to onScannedEnemy?() in addition to making it extend CoopRobot (yes, that was seriously all you needed to change). I think I can rebuild it so that the only thing you need to change is making it extend CoopRobot. I'll see what I can do. -- Vuen


Okay, I've got quite a bit of stuff done so far; it's basically already ready for beta use. I've built it much better than the version that was lost about a year ago; there is much more functionality, and it is much easier to set up. Now, all you have to do is extend CoopRobot instead of AdvancedRobot and everything is handled automatically. It is far more compatible than old versions. In the old version, certain bots were completely incompatible with the system simply as a result of their design. In this version, bots like this *should* work fine.

Anyway, so far I've created the entire event manager; it completely handles and parses and dumps all events manually from Robocode. In the previous version, you couldn't use an event manager, and had to rename some event handlers. In the new version, getXxxEvents?() methods work perfectly, onScannedRobot still works like it should, etc., except that none of these methods will ever return scans on your teammates; only enemies. They will also never return coop messages; these are handled automatically and removed from the event queue. In the previous version, you were not allowed to send messages at all; you can now send messages exactly like you used to. This means that TeamRobots can now convert to CoopRobot without losing any of their teammate functionality; any team strategies they do will still work between these bots, but they will also be friendly to other CoopRobots. This is probably the main big feature of the new CoopRobot; TeamRobots as well as AdvancedRobots and Robots can directly convert to it without any changes.

Anyway, so yes, what I have works surprisingly well, and by simply changing 'extends AdvancedRobot/TeamRobot' to 'extends coop.CoopRobot' I've successfully created a team of two Cakes, two Wolverines and a Rapture that coordinate their color and don't shoot eachother. But in normal non-team play, these bots are completely unchanged, and should work exactly the way they did when they extended AdvancedRobot. Anyway, I have a few assignments to get done soon, so I probably won't be able to work on it much for a couple days, but I'll see if I can fix up a few issues, document it, add some teammate functionality, and test it out with some well-known open source melee bots to see how it flies; then I'll release a beta version so everyone can start playing around with it! :D

-- [[Vuen]


Okay, I'd like to ask about how you guys want the color sharing set up. I figured that most people like to customize their body color; body color is the most visible part of the robot, and it is what makes robots distinct. So the way the system currently shares colors is that it makes robots on the same team choose the same gun and radar color and lets the robots choose their own body color. At first I was worried that this would make it too hard to tell team members apart, but it actually looks pretty good. I was wondering what your thoughts were on it. I'd love to put out a beta to show you, but once we pick a way, we have to stick with it, because all versions of CoopRobot will have to be forwards and backwards compatible. I can get you a screenshot of it in action with some melee bots if you'd like to see how either way looks. What are your thoughts? Body color sharing, or Turret and Radar color sharing? -- Vuen

I think sharing gun and radar would work quiet well. It lets you recognise bots you already know from their non-team versions, but you can still tell what teams they are on. How does it choose the colours? Is there anyway to make sure no 2 teams have the same colours? -- Tango

The colors are simply chosen randomly, using a sine function to accentuate the contrast between the RGB values (although I don't even think this works the way I want it to). Unfortunately it's not really possible to make sure no 2 teams have the same colors, but it's not very probable. The color selection code in CoopRobot is this:

 teamColor = new Color((int)((Math.sin(Math.random() * Math.PI * 2) / 2 + 0.5) * 256 - 1), (int)((Math.sin(Math.random() * Math.PI * 2) / 2 + 0.5) * 256 - 1), (int)((Math.sin(Math.random() * Math.PI * 2) / 2 + 0.5) * 256 - 1));

I'm not sure if it mathematically works like it's supposed to, but it always seems to produce some nice, vibrant looking team colors. I like it :) -- Vuen


Okay all, CoopRobot beta1 is out. Even if you don't have a melee bot, at least try downloading some of the sample coop bots and mix them up. Check out how smoothly JollyNinja and Wolverine work in droid form, with not a single line of code in their droid classes. If you do have a melee bot, then please, try testing it out and let me know if it works! It won't take you more than two minutes, and you will find that your robot will be able to team up with any other robots under CoopRobot. If your robot works properly under CoopRobot, consider releasing it that way; the current release version of Cake is already implementing the system, and its team performance is improved over that of the old team. Anyway, let me know what you think. -- Vuen

Cooooool~~~Vuen,it comes so fast,i played it,very interesting,i made a team of Yager seconds.~;] A question, If i called setAllowTeamScans(true),can i receive the scan event on my teammates,eg:my hero scanned a droid of us,can the droids receive this scanned event? (seems not in my testing) -- iiley

I know now,You writed some about that question,but sorry i had not read clearly on CoopRobot page.I can know my teammates' info from calling getTeammateXXX?() ~;],But i suggest thant teammates can receive teammates scans,then many melee bot can change to team easiler as the count the gravitation in onScannedRobot.the last,Thanx you Vuen. -- iiley

Hmm... This is an interesting point, and a good idea. Since I have to create events for collisions anyway, I may as well also create a ScannedTeammateEvent that gets sent to an onScannedTeammate? method; the scans will simply be generated by CoopRobot rather than being actual scans, so the robot can get one of these every turn on every teammate. It will also be handier because dead robots and non-team robots will not return scans. I'll put that on my list of things to do for next version :). Also, did the Droid version of Yager work? -- Vuen

Yes,it works,but the teammate scans did not happen,so the teammates always hit each others,i add some code,then it works fine,it did better than DemoniacNimrods.Cool~;] -- iiley


Robo Home | CoopRobot | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited October 28, 2003 18:56 EST by Iiley (diff)
Search: