| chess123mate |
| Posted: Jun 9 2007, 06:44 AM |
 |
|
Logical Programmer
    
Group: Members
Posts: 587 (24 robots)
Member No.: 936
Joined: 3-February 07

|
Just lastnight I quickly made a bot that randomly did things, such as move around, rotate, do both, fire, scan, do both, change sliding and speed options, etc.
Once I got it completed, I added 3 of them to a match against another bot. (There were no teams, since I didn't program them to care about teams.) While the smarter bot fought against one of the random ones, the other two would mimick each other! At the exact same time, both of the other bots would dance around the arena, stop, etc. They weren't doing different things, rather the exact same!
The randomization of RB should be changed. Unless you want to say that the randomization is the same for all bots on one turn, to make it fair, I believe that it should be modified to be different for each bot.
Is this possible, unfair, a good idea, or what? |
| Ichabod |
| Posted: Jun 9 2007, 06:56 AM |
 |
|

Grand Vizier
    
Group: Contest Hosts
Posts: 1238 (16 robots)
Member No.: 700
Joined: 2-May 06

|
This has come up before. You should check out the Conjurer robot by Jamie. It exploited the pseudo-random numbers of Robot Battle to create cookies and mines. The random numbers were changed in response to that.
It would be nice for each robot to have it's own seed in the pseudo-random sequence, but you can generate that yourself. Take a random value given to the robot by the game, like its position or rotation, and generate that many random number at the start of each game.
-------------------- -Ichabod Nils illegitimo carborundum
| QUOTE (Cho Setsu) | | By eliminating disturbances, we redouble the disease. |
131,628,711 robots killed in the name of simulation |
| chess123mate |
| Posted: Jun 9 2007, 07:21 AM |
 |
|
Logical Programmer
    
Group: Members
Posts: 587 (24 robots)
Member No.: 936
Joined: 3-February 07

|
I think I have looked at conjurer, but I didn't actually download it. So you're saying it doesn't work anymore? Thanks for the info! I didn't know that was how you did it, to make them different. Still, wouldn't that just mean that one robot would do an action, then the other would do the same action a several turns later?
This post has been edited by chess123mate on Jun 9 2007, 07:24 AM |
| brad |
| Posted: Jun 9 2007, 09:43 AM |
 |
|

Administrator
    
Group: Admin
Posts: 543 (10 robots)
Member No.: 1
Joined: 7-November 02

|
Each robot does have its own random generator and seed now. That is why conjurer doesn't work any longer. chess123mate if you post some code, people could see if it is doing what you expect. |
| chess123mate |
| Posted: Jun 9 2007, 11:34 AM |
 |
|
Logical Programmer
    
Group: Members
Posts: 587 (24 robots)
Member No.: 936
Joined: 3-February 07

|
I don't have the robot with me at the moment, but the concept is simple. In a very simple form, it looked like this:
| RSL | Init { name("RandomMania") author("chess123mate") version("random") regcore(core) blocking(off) } core { getrandom(3) if(_result==3) getrandom(5) if(_result==1) #move ahead a random number elseif(_result==2) #continue doing different things endif #and repeat the randomize and if/elseif structure for moving/rotating, scanning/firing, and gun/radar. endif }
|
That was the basics of the bot, and so if you put that bot multiple times in one match then they would keep their actions the same until one of them saw something that it wanted to move to, such as a cookie or robot. I believe Ichabods suggestion was to add this into the Init:
| RSL | i = 0 while (i<_xpos + _ypos) getrandom(1) i = i + 1 endw
|
Then each robot will seem to act on its own, at least to some extent. Correct?
Thanks Brad for that info!
This post has been edited by chess123mate on Jun 9 2007, 11:35 AM |
| Ichabod |
| Posted: Jun 9 2007, 11:48 AM |
 |
|

Grand Vizier
    
Group: Contest Hosts
Posts: 1238 (16 robots)
Member No.: 700
Joined: 2-May 06

|
| QUOTE (brad @ Jun 9 2007, 11:43 AM) | | Each robot does have its own random generator and seed now. That is why conjurer doesn't work any longer. chess123mate if you post some code, people could see if it is doing what you expect. |
Yes, but all the seeds start at the same number. So multiple copies of a robot using random numbers will all use the same numbers.
-------------------- -Ichabod Nils illegitimo carborundum
| QUOTE (Cho Setsu) | | By eliminating disturbances, we redouble the disease. |
131,628,711 robots killed in the name of simulation |
|