Author Topic: The amazing Antbot  (Read 22823 times)

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #15 on: May 01, 2008, 09:22:20 PM »
I just saw something great in the antbot's behaviour: two scout were pulling in a veggie together because it was too heavy. It was caused by one scout who was trying to drag it away, but couldn't because the tie kept breaking, until another one came along and helped him.

Later I managed to get four scouts pulling away at a veggie with 23000 body.
« Last Edit: May 01, 2008, 09:24:13 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
The amazing Antbot
« Reply #16 on: May 01, 2008, 11:56:33 PM »
Quote from: bacillus
I just saw something great in the antbot's behaviour: two scout were pulling in a veggie together because it was too heavy. It was caused by one scout who was trying to drag it away, but couldn't because the tie kept breaking, until another one came along and helped him.

Later I managed to get four scouts pulling away at a veggie with 23000 body.

Could include your sim, I'ld love to see this.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #17 on: May 02, 2008, 12:08:54 AM »
AAAAARGH!!!
           
Could you please read the post I made before, before saying things like that!?

However, I'll gladly give you the simulation settings I use so you can run your own simulation:
Bots: Alga Minimalis, Antbot v1.4 (only 1 to start with, 2 if you want to see hive wars)
Field Size 8, 500 max vegs, 100 repro threshold and veggies per repop event
Solid Metal resistance, max collision elasticity
Disable all Muations

The rest you leave on default.
Remember that you need a lot of patience when running antbot.
« Last Edit: May 02, 2008, 12:17:15 AM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
The amazing Antbot
« Reply #18 on: May 02, 2008, 07:00:21 AM »
lol, no wonder nothing was working as intended...
When you post a bot with no instructions, people like me are going to run it with standard F1 settings
Anyway you don't need to post a sim where all the action is going on, if you just start the sim and save it right away it will be very small.

I uploaded a settings file (But it seems it has has problems adding the bots, so you have to do that manualy).
Anyway the settings file is 2KB... you don't even need to compress it...
Added some sim files aswell... you need to have the bots used in your folder for as always, so added those aswell...
(The OponentAntbot was just to get a different color for the War sim)

Anyway just saying, a settings file would be nice atleast if the bot doesn't run in F1, and it's probably faster to upload 2 KB than to write instructions...

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #19 on: May 02, 2008, 06:51:47 PM »
Thank you, that's definitely going to help me.
I'll have a look at the ant wars simulation, I haven't really seen much of it yet.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #20 on: May 02, 2008, 06:57:13 PM »
WOW.
you can really see the garden structure in the simulation.
It does look as though the guards don't do their job; I might have to do something about that.
OK, I have rewritten the code so that guards only turn towards food if their nrg is less than 1000. They patrol the perimeter very nicely now.
« Last Edit: May 02, 2008, 07:06:49 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Blacksmith

  • Bot Neophyte
  • *
  • Posts: 24
    • View Profile
The amazing Antbot
« Reply #21 on: May 02, 2008, 09:48:02 PM »
er, so have you posted an updated code?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
The amazing Antbot
« Reply #22 on: May 02, 2008, 10:02:48 PM »
As of this very posting, Antbot 1.4 is the latest.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #23 on: May 03, 2008, 06:37:30 PM »
Someone sent me a message advising me to use timers in my activation to remember locations. I'm afraid I don't quite understand the logic behind this. Could you explain the idea in more detail please?? The way I understand it is that a bot marks is last location every X cycles.
« Last Edit: May 03, 2008, 06:38:42 PM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
The amazing Antbot
« Reply #24 on: May 04, 2008, 01:38:43 AM »
Slim Evo used an individuality gene that recorded 10 bot ids in one gene. Every time a bot came upon a veggie, you could use a location store, but always have the hive coordinates stored. So say your bots could remember 20 waypoints, that means they could communicate with the army and queen about where food is, where enemies are along the way, where to send help, having positions remembered gives the bot a consiousness of its suroundings. I suggest 15 waypoints for course use, meaning every 100 cycles, a waypoint is stored only when nothing is seen; that gives your workers a route to follow and return to at any point along the route, a highway system if you will. Allocate 10 waypoints for enemy coordinates, each time a new bot id is seen near or around a waypoint besides enemy waypoints. Allocate another 20 waypoints for food and you've got a bot that knows where 20 points to harvest are, 10 enemies and how to get to and from the hive. This also sets your bots up for specialization; a bot on one side heading away from the hive will always work in the same general direction, never going to the other side of the hive and interfering unless called for. You could also add 5 waypoints for other hives, and you might want to consider some variable to control the amount of agression the hive takes based upon the number of same bot species reported. If you want I can pm you my universal conspec genes, but I have to tell you they aren't that efficient, they lay out the general purpose of them. I could see this bot becoming very intelligent with only a few more genes for memory manipulation. Fortunately, they make a memloc, so you can write to locations faster and easier than the system I used in Slim Evo, which was merely a string of conditions. Also, this may lead you to want to do some tie communications between scouts to share information about enemies and routes, it may be possible to store 100 waypoints in a single bot, using 200 memlocs, but the rigging would no longer be for one gene.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #25 on: May 04, 2008, 01:53:07 AM »
That's a whole lot of memory locations. I played around with the idea of these pheromone highways, but the paths could only be followed by individuals and not shred with others. Why remember places where there is no food? Maybe tracking the ant's position when coming back from food may help.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
The amazing Antbot
« Reply #26 on: May 04, 2008, 04:30:07 AM »
It depends on how difficult it is to navigate.  If you were to add dozens of shapes to the world, for instance, than simply remembering where food is might not be enough, because you have a whole maze to navigate.

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
The amazing Antbot
« Reply #27 on: May 04, 2008, 02:17:53 PM »
Quote from: bacillus
That's a whole lot of memory locations. I played around with the idea of these pheromone highways, but the paths could only be followed by individuals and not shred with others. Why remember places where there is no food? Maybe tracking the ant's position when coming back from food may help.

Say the bot needs to maneuver around another hive, it is important that it remembers the waypoint to get around the hive, and not cause tensions. Since your ant bots are very good at being agressive, it is the best interest of your bots to remember important information such as how to avoid other hives and not infringe on their food collecting. The idea is so no matter what your bot decides to do, it will always have a return point. I have detailed the conditions more for the 20 waypoints, now it only counts to the timer when the bot is facing away from the hive, so you dont get overlaps in waypoints, and it uses a comparison for distance instead of timers to activate the intial timer of 200 cycles now reduced to 50. Every 200 botwidths could be recorded as safety points. You already have a complex mechanism for communication, its a matter of genetic language. ''I/O 7-X coordinate of last food sighting ''I/O 8-Y coordinate of last food sighting and I/O 3 are for commands of some sort. So I/O 3 allows your btos to say something meaning the 8 and 7 I/Os should be stored here, or whatever. Say you want the waypoints to be used by everyone, limit scout repoduction to one until the queen is given a highway, make all default births dormant for 30 cycles, so the queen can write the locations in their memory, having them all tie together to exchange the missing pieces will make this faster for the queen. Now you have 20 waypoints, where scouts and warriors can go, search for food, protect each other and maintain the perimeters near food. THe protocols for when and what btos communicate can be determined using I/O 2 since all types are there. Warriors and Scouts could exhange information on enemies and veggies to make sure both are taken care of for the queen, and I/O 3 could also be used as an override to make all bots active for war with I/O 7 and 8 giving them the coordinates of the enemy's last position, and it might be useful for I/O 9 to tell how long ago the enemy was spotted near the queen. THis information is vital, the bots could fan out to cover all possible locations of the enemy, and communicate locations with ties, a wall of ants if you will, all capable of moving for the queen. I like the idea of a super inteligent ant, even tho it will require 90 memory locations, this also means your bot will still do something with mutations later on; as the locations and values change, the bots will exhibit different behaviors as a result of it. Keep mutations chances very low in occurance, so it doesn't fall apart everywhere, that could be detrimental.

Ideally you would store 500 waypoints, but the genetic coding would have to be broken up since the customizable sysvars are sparatic. Other than that, you wouldn't need Slim Evo's bot id gene, its too big for this project, use something like;

cond
*.robage 0 =
start
40 .memloc store
0 .memval store
stop

cond
*.robage 32000 sub 2 mod 4
start
.memloc inc
.memval inc
stop

something for how a waypoint array counter would work wiht only a handful ogf smaller genes. for comparison purposes, make a gene to check that you dont overlap certain waypoint types, and check always enemy waypoints with all your waypoints to make decisions based on safety, or need for food.

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
The amazing Antbot
« Reply #28 on: May 05, 2008, 04:17:22 AM »
I thought about this a while and came up with a reasonable solution: A block of sysvars for X and Y is set, the max and min values noted. A variable is used to control whether the location is incremented or decremented. It cycles through all its waypoints, telling other bots the coords and the waypoint number. So say the xpos starts at 900 and y at 930, the pseudocode would look something like this:
Xpos - > 900 cycle add
Ypos - > 930 cycle add
900 cycle add -- -> outX
930 cycle add -- -> outY
cycle -- -> outC
If control = 0 then increment cycle else decrement cycle
« Last Edit: May 05, 2008, 04:18:30 AM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline gymsum

  • Bot Destroyer
  • ***
  • Posts: 215
    • View Profile
The amazing Antbot
« Reply #29 on: May 05, 2008, 11:42:44 AM »
Ok, so that gives your bot a way to communicate valid waypoints between eachother, but you should think about adding a distanmce comparator to find the closet points. Since you'll also store several points leading to food, another comparison can be used to find the shortest, the most lucrative, and the greatest distance. Set Control to 1, for write, 0 for hold, and -1 for erase, you can also use the control as a multiplier. I'm going to tinker with some waypoint memory stores and recalls.