AI Food Gathering code
Community Forums/Showcase/AI Food Gathering code
| ||
Sunday afternoon coding... A sort of ant type food gathering AI thing going on... There's a bunch of food and a bunch of workers. Workers go find food. If a worker sees another worker with food and they are closer to the base they will take it off the other one to form a sort of chain. Anyway... more curious than useful! |
| ||
hey that's neat. Reminds me of the ants that invaded our dining room last autumn! |
| ||
cool... could be used in a Comand & Conquer sort of game... --Mike |
| ||
Wheres the stomp button? I want to squish the ones in the corner. Pretty cool, do they depend on food? That would be cool to see them eventually die off due to lack of food. |
| ||
Just made it more interesting... Added a caller mode. When one finds food if there's no-one else calling it will become a caller to attract the others. |
| ||
Very good rob ! :) like always :) |
| ||
Even better :D I made something comparable to this. Everyone had a job: Baker, Guard or Thief. Bakers would make food. Thiefs would steal food (if they cant afford it from the baker) or they would buy it. Guards would buy food, or persue thiefs (if seen when stealing). Everyone had to sleep and eat. I dont know why I deleted it... |
| ||
Well why not now add preditors! that try to eat the workers. And guards. who have to guard the workers? |
| ||
Nice... especially the 'caller' mode. I did something similar a long way back where the ants could emerge from a 'hive' North, South, East or West. A neural network then evolved the best strategy for sending out workers based on which direction provided the best harvest. There was also a huge magnifying glass that let you slow down the ants or frazzle them out of existence... Unfortunately, I didn't understand Blitz collisions very well at the time, and ants kept 'popping' out of the world as they got forced beneath the ground or escaped from the arena. I eventually abandoned it for this reason. |
| ||
I had a little program myself. This is what I came up with (Blitz3D) The only borrowed code is the FPS Limiting Function. I am still working on it. Going to add scent trailers when I get the chance (like the Robs Caller Mode but more based on ants scent trails) |