[Home]Chameleon

Robo Home | Changes | Preferences | AllPages

A Chinese bot. One of the strongest OneOnOne bots around. ProblemBot of Marshmallow. A true SlowBot as well.

Maybe iiley can tell us more about this bot? -- PEZ

I think the secret behind this bots success might be its movement. This is, by far, the bot that Marshmallow has the hardest time to hit. iiley if you could make the author of Chameleon to make a challenger version of for the MovementChallenge please? That would be very interesting. If you do, please ask her/him to switch off the gun completely so that running 500 rounds with it is doable. -- PEZ

Chameleon uses Spark's movement when he is far from enemy in fact,well maybe you can check Chameleon 's source code from http://www.robochina.org/web/cms/function/downbot.php?id=85&cid=1 -- iiley

But it is the movement at closer ranges that is the trickiest. Marshmallow has a hard time hitting Spark too of course, but I think not like Chameleon. -- PEZ

It use statist targeting too. But with some great creative~;] -- iiley

It must be some pattern matching too, right? Is the source for version 0.83? .... I'll check myself. -- PEZ

I've started to read up on it. It stores its data in a rather unique way, I'll let you know when I made sense of it. I've never seen a gun quite like it. -- Kawigi

I think it looks a bit like my secret gun I have been planning for Marshmallow for a while now. But maybe not exactly. iiley, do you think you can get Wilson to participate on this wiki? From the code it looks like he speaks at least some english. Wonderful code by the way. Well structured, well factored, easy to read and no code comments obfuscating the reading. I think I'll use that structure for Griffin. That way it should be easy for others to participate in its development. -- PEZ

Last time i told him to robocoderepostory forum but he doesnt come,now I only know his email: maybe you can email him to enter robowiki. -- iiley

OK, I just did. (Removed the e-mail address in case he doesn't want it published.) -- PEZ

If you told him to speed his bot up, he's listening - Chameleon 0.91 is faster than Aspid on my machine! The time it will take now to test the next version of FloodHT against his ER 'neighborhood' just went down by about 20%. Thank goodness! (Hopefully this will also turn into a page to explain how Chameleon works, too) He also seems to have started caring about skipped turns, since this version of Chameleon swears when it skips a turn (just noticed that, he must have forgotten to take that out before uploading. Maybe Iiley should let him know about that?) -- Kawigi

It seems there are many people who are intrested in the targeting algorithm of Chameleon. I will briefly explian the theory here.

I think that the current attributes of a bot determine its position after n turns. Although the position is not unique, we can choose the one which the bot most like to go to shoot.

The enemy is the origin and the heading of the bot is the direction of x-axis. Then we can gain the coordinates of the bot after n turns(n=1,2,3...80). For statistic, I partition the plane into squares whose area is 40*40. I use a pair of integers to denote every square. The pair of integers are just the coordinates of the center of the square divide 40. For example, the origin is the center of a square and I use (0,0) to denote the square. And the right adjacent square of it is (1,0). Now we can use a square to replace the coordinates of the bot. (a,b) denote a square now. Because possible squares which the enemy can reach in n turns are limited, we use a HashMap? to store them as well as their rates.

We adjust the rates as following. According to the status of the bot we find the HashMap? and if the squres appears, the rate multiple 0.99 and add 0.01. And the others just multiple 0.99.

We choose shoot direction as following. Accoding to the status of the bot we find the HashMap? and use the data to analyse, then select the best direction and energy to shoot. Which direction is the best to shoot? It is difficult to answer. We wish the rate is the highest and the energy is 3. But in most situaion the two elements cannot be satisfied concurrently. We should design a method to evaluate which is the best. I have given a mothod to choose the shoot direction. But I believe it is not the best.(You can know the method by reading my source code).

What is the status of a bot? The status of a bot is identified by its attributes. I think the attributes include velocity, acceleration and heading change. I classify status by these three factors.

My explanation is over. It is difficult for me to explain the theory clearly due to my poor English. Wish you can comprehend what I say. -- Wilson Zhu

Thanks Wilson. It was well worth the wait to get this description. Don't worry about your English. We have had time to train on iiley's writing. =) I think that with these coordinates and velocity, acceleration and heading change you capture many "situations". Can you describe the method you use to choose direction some as well? It'll help in understanding the source code.

While reading the source code I noticed that the hashCode() function in the Position class probably should better identify each unique square. As it stands now coordinate (0,1) will get the same hash code as (1,0). While this is a "legal" hash method and this might not matter all too much as it is used now, but with more squares in the hashmap you could run into performance problems. I suggest you use the same paradigm as is used throughout the Java library and write that hashCode() function like so:

public int hashCode() {
   int code = 17;
   code = 37 * code + x;
   code = 37 * code + y;
   return code;
}
Of course, I would maybe not use my own Position class at all. There's a quite suitable class named "Point" in the standard Java library. You would get the "hashability" for free then and, if you ever would find use for it, functions like translate(), distance(), distancdSq() and such. Never the less, I might try to use a gun like this for Tityus, it sounds like it shouldn't take too long to code a first version of it. Again thanks for sharing this innovation of yours. I would have hesitated to share it if it had been mine. -- PEZ

Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited May 18, 2006 21:36 EST by Florent (diff)
Search: