Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: Elite on January 26, 2006, 01:43:08 PM

Title: Community project (now pretty much defunct)
Post by: Elite on January 26, 2006, 01:43:08 PM
:) I've just had an idea for a great community project  :)

What do you guys think?


EDIT: here's (http://URL=http://forum.darwinbots.com/index.php?showtopic=1091) the recruitment thread


The concept of hibernation was introduced in this thread (http://forum.darwinbots.com/index.php?showtopic=1083)
Black Ant can be found here (http://forum.darwinbots.com/index.php?showtopic=832)
The Wraith (http://www.gateworld.net/omnipedia/races/links/wraith.shtml) (from Stargate Atlantis)
Concerning the recent lack of activity here (http://forum.darwinbots.com/index.php?showtopic=1084)
PY's antbot can be found here (http://forum.darwinbots.com/index.php?showtopic=1087)

Wraithbot.
A hibernating bot that sleeps periodically to let it's prey's numbers increase and comes out of hibernation when the queen and the keepers decide that it's ready for 'feeding' :evil:
It's like an extremely advanced Black Ant or PY antbot.

Here's the hirarchy:
   The Queen - head of the hive, picks the hive coordinates and decides with the keepers when it's time to hibernate and wake up. There is only one queen that reproduces to form a hive, and only once to produce another queen. If the queen is killed or missing for too long then a random keeper becomes the new queen. If two queens exist then they will fight to the death. Queen starts off as the first bot in the sim (starts with one high-energy bot)
   The Keepers - 10% of the population. Tasked with relaying orders and defending the hive and the hibernating 'others'. Wake the sleeping with an .out signal or a memory shot if all else fails. If a keeper is killed then the surviving keepers will wake the hive! Keepers can: Patrol the hive, protect the queen, go out hunting (in shifts) and manage the hibernation of the hive.
   The Others - the rest! The bulk of the population hibernates when there isn't enough food to go around to sustain the population. They are woken by keepers when food is plentiful and will then cull nearly all living things on the map until the keepers send them into hibernation again. They will leave a small percentage of prey alive to reproduce.

Wraithbot will NEVER EVER be used in leagues (so don't worry about interference from chameleon-bots and F1 quality bots etc), but is instead for the creation of a stable ecosystem of these things preying on veggies and a simple bot (Animal Minimalis?, or one we can create - something with few genes that survives well but isn't too strong) population.

Makes extensive use of .out1-5/in1-5

.out1   Hive location x coordinate (queen picks this and all bots store it to .out1 if they see it)
.out2   Hive location y coordinate (queen picks this and all bots store it to .out1 if they see it)
.out3   Time to hibernate (queen or keepers decide when to send everyone into hibernation - normal bots that see a number in .out3 will go to the 'hive' to sleep. If the don't know where it is then they will 'ask' a keeper via .in1-2)
.out4   Orders and communication
.out5   Orders and communication

The sim will start with one high-energy wraithbot, who will reproduce to form a hive. Alternatively, the queen could be a different species.
The angle function can direct bots to the hive.
For 2.37.6 ideally - for large simulations.

Well, that's the concept.


This is a [span style=\'font-size:21pt;line-height:100%\']MASSIVE[/span] project and I need your help to realize it. I can't do this by myself. Hopefully, the whole community can participate (that's what it's for right  :D ) from newbies to bot gods
Forum seems to have been quiet lately - something bot-orientated we all can cooperate on is just what it needs  :D

 :help:  :help:  :help:



Comments?
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 01:49:09 PM
Sounds fun.

Not too much more than my old ant bots already do though. Have you tried out my ants? They are pretty crappy at fighting but the hive concept works well.

Actually you can't try them out since the link to our old database site appears to be dead. I guess I had better post them here.
Title: Community project (now pretty much defunct)
Post by: Elite on January 26, 2006, 01:51:49 PM
I'm thinking of an extremely advanced antbot concept: ie. makes decisions on how to defend the hive etc.
And it's something to bring the community together  :)

BTW, we can't make this a sticky can we?  :D
Title: Community project (now pretty much defunct)
Post by: Numsgil on January 26, 2006, 01:54:12 PM
I've stickied it.

As to writing the actual code, I recommend setting up a page on the wiki for it.  There was a bot we were working on a while ago on the wiki.

The main danger is in people not testing their changes in the Dariwnbots client (I'm guilty as much as anyone), so you need a project leader (say, Elite) to constantly provide QA for it.
Title: Community project (now pretty much defunct)
Post by: Elite on January 26, 2006, 01:56:53 PM
Quote
you need a project leader (say, Elite) to constantly provide QA for it

 :D

Thanks for stickying it. This is going to be fun ...

How do I wiki it? (I'm not a member of the wiki)
Title: Community project (now pretty much defunct)
Post by: Numsgil on January 26, 2006, 02:02:20 PM
Anyone can edit it, but joining means we know whos editing what.

Ideas page (http://www.darwinbots.com/WikiManual/index.php?title=Ideas) has Humilis, which was another joint project.  If you're totally new to wikis, you can find information on how to edit in the community portal page I believe.
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 02:05:28 PM
I have uploaded my Ant-bot 5 to the beastiary. You might want to use some of the concepts from it in your project.

To get the best out of my ant bot run 2 or 3 copies of the same species against each other so they can each have a unique color. Only make one of each and give it a bunch of energy. It will feed until it gets 30,000 energy then it will start a new hive and make workers.

Run in size 2. If you go to size 3 or above you might crash the program because the ants use X and Y coordinates to move around. Since these are stored in memory locations that can only go up to 32000, anything above that in screen size will crash it.

(I still think I a going to have to go to "double" type variables in the next version of V2.36)

If you have set it up as descibed you should get several colonies develop. In each one, the workers will always return to their own queen to feed her. In Ant-Bot 5, the queen has the ability to defend herself by brainwashing workers from enemy colonies.
Title: Community project (now pretty much defunct)
Post by: Elite on January 26, 2006, 02:09:02 PM
I've added a page in the wiki

OK, here's how it will work:

Post here to participate, and each participant can work on a certain section of code. Post improvements and use this sticky to colaborate on the project.

So who's in?


EDIT: PY, your antbot sounds very similar  :) . We're aiming for a hyper-improved antbot which hibernates, has an unfixed queen and other wraithlike stuff, but the queen's hive routines may prove very useful
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 02:23:34 PM
Obviously needs to be modified to be a good fighter bot too. My ant bots lack agression to a large degree but are otherwise highly successful in the absense of predators.

Thanks for reminding me of this kind of sim. This kind of stuff is way more fun than combat bots.
Title: Community project (now pretty much defunct)
Post by: Numsgil on January 26, 2006, 02:27:42 PM
I can putter about a bit with the bot but I only have so many coding neurons in my head and if I devote too many to bot programming the C++ port'll never get finished.  :P
Title: Community project (now pretty much defunct)
Post by: Elite on January 26, 2006, 02:30:43 PM
Yeah, there's more to Darwinbots that finding bugs and winning leagues  :D

Put a bot like this in a league and it would be thrashed immediately. It's much more fun to watch an intricate little ecosystem, with the bots going into hibernation and then coming out of it to decimate the ecosystem and then to sleep again.

Three sim classifications:
 - Combat sim
 - Evo sim
 - Eco sim



Post here to participate  :)

BTW: Don't worry PY and Numsgil, this won't end up becoming more work  :rolleyes:  - I'll try to handle it and/or share the work between participants.
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 02:31:33 PM
know the feeling. I am in the middle of a bit of a lull at work right now or I couldn't even post this much.
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 02:34:07 PM
I have about 500 ant bots on screen right now. Size 3 works OK.

There are still 4 distinct colonies but a bunch of the workers have defected to other queens. So far none seem to have the upper hand.

Fascinating things, ant-bots.
Title: Community project (now pretty much defunct)
Post by: Elite on January 26, 2006, 02:37:42 PM
Cool

What's an artificial life simulation without actually watching complex life

EDIT: Wow, watching antbots is fun!  ^_^

EDIT: They're starting to spread. There's a red queen and a blue queen and they set up really near each other. They still live quite peacefully though so long as they don't trespass or steal food. I wonder what an antbot would evolve into?

EDIT: A renegade blue ant has set up it's own colony! There are now three!



Post to participate in the project  :)
Title: Community project (now pretty much defunct)
Post by: Ulciscor on January 26, 2006, 04:16:23 PM
Although I am completely inept at bot programming, I would be more than happy to lend some moral support.  :P If there is anything I can do, I'm up for it. Good luck with this very cool sounding idea!
Title: Community project (now pretty much defunct)
Post by: Griz on January 26, 2006, 05:10:26 PM
Quote
I have uploaded my Ant-bot 5 to the beastiary. You might want to use some of the concepts from it in your project.

To get the best out of my ant bot run 2 or 3 copies of the same species against each other so they can each have a unique color. Only make one of each and give it a bunch of energy. It will feed until it gets 30,000 energy then it will start a new hive and make workers.

Run in size 2. If you go to size 3 or above you might crash the program because the ants use X and Y coordinates to move around. Since these are stored in memory locations that can only go up to 32000, anything above that in screen size will crash it.

(I still think I a going to have to go to "double" type variables in the next version of V2.36)

If you have set it up as descibed you should get several colonies develop. In each one, the workers will always return to their own queen to feed her. In Ant-Bot 5, the queen has the ability to defend herself by brainwashing workers from enemy colonies.
need some details, PY ...
or perhaps a settings file to get the environment right.
I run it in 2.36.7
3 versions of Ant, each starting with 30000 ...
100 veggies ...
they cruise around, losing energy rapidly ...
sometimes shooting at veggies or one another ...
and then die.
have run it 20 times or so ...
same results every time.
no reproduction or hive building ...
they just move around losing energy and then die.

tried with a starting population of 5 for each ant version ...
thinking maybe they aren't all initially born as queens ...
but get the same results.

how can I tell from the console if it is a queen?
what number in what location?

some hints, please.

thanks
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 05:38:56 PM
it can sometimes be awkward getting them started.

Try setting them to 5,000 energy rather than 30,000

Make sure there are plenty of veggies. At least 150.

Sometimes you might need to pick up one of the infant future queens and physicaly aim it towards a patch of veggies or reposition one to feed better.

Once the young queen absorbs enough food, she will stop feeding and make a bee-line to a randomly determined location for the new hive. Once there she will begin to rotate on the spot and will spit out one or two young who will head off in search of food.

You can always recognise the queen because she is the only one spinning.

Here is a settings file that works for me. The paths to the bots may be wrong for you though.
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 26, 2006, 05:41:14 PM
you might want to lower the costs a little too. I just realized that this settings file has very high costs for saving to memory.
Title: Community project (now pretty much defunct)
Post by: Griz on January 26, 2006, 06:59:14 PM
Quote
Here is a settings file that works for me. The paths to the bots may be wrong for you though.

well, some path is as I get a crash.
looking in your settings ....
I see "&#\Robots"
don't know why that wouldn't work as long as I have my Robots folder
in the DarwinbotsII folder, eh?

ahha!!!
got it.  your settings point to "Ant-Bot 5.txt"
and the name of the one I just downloaded from here is  "Ant_Bot5.txt"
with an underline rather than a dash.

ok. got it working.
what I had before was ...
they would feed until reaching 30000, then begin to wander ...
but never reached a place where they would stop and start
a hive, just wandered on losing energy until 'poof'
or ... would begin to spin, but never produce any offspring ...
energy varying around 500.
also noted that on occasion, even when feeding ...
the energy gets stuck right around 5000, dipping to 49xx something
and back to 5000, nothing else ever happening.

btw, as they have to get to 30000 before moving on ...
why start them way down at 5000?
just wondering.

I never did alter the costs ...
have no idea what to change.

well, it works anyway ...
thanks.

I like this idea of doing an ecosim ...
kinda what I was looking for all along ...
trying for some stable ecosystem populated by a number of species ...
all with their own niche, yet dependant upon each other ...
rather than about the last one standing.

where the hell did this Elite dude come from!?!?!

I can't understand but 1/100th of what he says but ...
excellent!!!! ;)
Title: Community project (now pretty much defunct)
Post by: Old Henk on January 27, 2006, 07:42:17 AM
Quote
Post to participate in the project  :)
Post Post ;)

How do you want to set this thing up? I say we have one project leader (Elite), who receives input from the other participants and then tells people what to do. I strongly feel that one person giving specific goals to participants is important, as it would become extremely chaotic and inneficient if done on a do-what-ye-wanna-do basis.

So... what do you want me to do?  ^_^

Henk
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 27, 2006, 09:13:22 AM
Quote
they would feed until reaching 30000, then begin to wander ...
but never reached a place where they would stop and start
a hive, just wandered on losing energy until 'poof'

That is an issue with the settings that I posted. I didn't realize until afterward that the cost of a store is set to 5 energy. That is ridiculously high and I have no idea how it got set that big. Make it about 0.2 and they will survive to start a colony.

Quote
also noted that on occasion, even when feeding ...
the energy gets stuck right around 5000, dipping to 49xx something
and back to 5000, nothing else ever happening.

Yeah. I saw that too. I think there is some kind of glitch. If you grab one of these bots and pull it away from the veggies, it will go straight back in and reach 30,000 almost instantly.

Quote
btw, as they have to get to 30000 before moving on ...
why start them way down at 5000?
just wondering.

because at some point they start to convert energy to body. The code assumes that if they are at 30,000 (rather than the trigger at 32,000) then they must be feeding pretty well so they will search for food and simultaneously store body, then often not make it to a food source or become a queen ever. Probably need to reprogram that part of the DNA when I get around to it.


Quote
where the hell did this Elite dude come from!?!?!

Dunno, but he has a particularly good grasp on complex chains of commands and how the stack works. Kind of makes me wonder if Endy has cloned himself  :D
Title: Community project (now pretty much defunct)
Post by: Elite on January 27, 2006, 11:20:27 AM
Hi  :D

OK, seems like this project could take off. I've already got some Ideas as to how to orgainse the construction of Wraithbot/Hivebot.

Thanks to Henk and Ulciscor  :D

Henk: If you want something to do now then go over PY's antbot and Black Ant and take a good look at the code  :)

Ulciscor: Thanks, we'll need some moral support and 'people coordination'  :)

Henk and Ulciscor: If you know how to manage/edit wikis then you will be in charge of that as of right now  :)
Title: Community project (now pretty much defunct)
Post by: Numsgil on January 27, 2006, 12:55:12 PM
I can help a little bit.  Especially with the code architecture, to help keep all the parts organized maybe.
Title: Community project (now pretty much defunct)
Post by: Old Henk on January 27, 2006, 01:09:53 PM
I can help, too. I'm no Endy-like-DNA-Master, but I know how to write a bot or two :)
Title: Community project (now pretty much defunct)
Post by: Old Henk on January 27, 2006, 01:13:35 PM
Quote
Henk: If you want something to do now then go over PY's antbot and Black Ant and take a good look at the code  :)
Will do! :)
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 27, 2006, 02:02:15 PM
Highly doubtful if I will have any time although I would like to help.

I thought I was in for a quiet day until 10 days worth of work with a 5 day deadline landed on my desk this morning. I get the feeling that I won't even get a weekend this week.  :(
Title: Community project (now pretty much defunct)
Post by: Elite on January 27, 2006, 02:11:17 PM
Might as well start things rolling

OK, here's the plan (massive amounts of info here!):


*****************************************


I am using 'wraithbot' to refer to the 95% caste and 'hivebot' to refer to the species

Heirarchy:

Queen - Head of the hive, unlike Ant queens is mobile but stays in the hive. Self-sufficient unlike Ant queens but all hivebots will protect her. Issues orders using .out/.in. There is only one Queen per hive. Queen makes high-level decisions. Keepers report information about the current state of the map to her. Queen reproduces once to produce a new queen.
- Queen DNA deals with decision-making with simple self-sufficiency routines.

Keepers - 1-5% of the population will become Keepers at birth. Keepers usually patrol the hive but occasionally wander the map gather information. Keepers make low-level decisions and 'report' information to the Queen. Keepers are sterile.
- Keeper DNA deals with information gathering with more complex self-sufficiency routines.

Wraithbots (soldiers/drones) - Far more autonomous than Ant workers. They reproduce and are self-sufficient. They go into hibernation at the command of the Queen and the Keepers when food is scarce, and are woken by the Keepers. 90% of the population.
- wraithbot DNA deals with hibernation and feeding/breeding, and the ability to stay in constant communication using .out/.in. Each wraithbot must 'report in' at the hive periodically (to control the population ie. hibernation)

Life cycle and feeding patterns:

The simulation is started with a few hivebots, a simple prey species and veggies. Veggies get 10 nrg per turn. The sim is run on a large (2-4) map

The hivebots will go to a prearranged point on the map and 'elect' a queen. The queen will act as a normal wraithbot but will coordinate the ordinary wraithbots and search the map for a good hive (at the start). The wraithbots will scour the map and feed heavily, but leave some prey alive. When the Queen and Keepers decide that their pray's numbers have fallen too much, then they will tell the other wraithbots (via .out/.in) to hibernate. As each wraithbot returns to the hive they will see the hibernating hive and do the same. The keepers will then stay alive and monitor their pray's population levels. They will venture outside the hive occasionally to feed on their pray, but in not as great a numbers as the regular wraithbots. When the Keepers feel that the population of their pray has reached sufficient levels for another feeding then they will return to the hive, tell the queen (who will decide based on what her other Keepers say) and wake the hive. The hivebots will then wake and cull the pray population until the Keepers send them to sleep again.
I would like to make them solely carniverous, but they can eat veggies if ther're desperate.

The hive:

The Queen picks a location for the hive at the start. It is somewhere as far away from the pray populations (communities) as possible.

It will be a single point (two numbers), but also have a boundary set with 2 points (opposite corners). Altogether: four numbers define the hive boundary, and two define the central point.

The Pray Species:

Need a bot that doesn't reproduce too fast and isn't exceptional at fighting. It also needs to be very communal and stay in one 'territory' (ie. one third of the map? - maybe they can lay down borders using x,y coordinates). A neat Idea would to allow them to come out to the hivebots if they have enough energy collectively. They also share nrg among their species. There will be many 'communities' of prey.
 - And it hasn't got to be too complicated, but theres alot of flexibility here.
A highly territorial but communal and benevolent species.

Costs:

Set lower than usual so that the bots don't have to spend all their life feeding. Ie, the hivebots set up their hive in an entirely different section of the map to their prey and venture out to eat them periodically. More time for interesting behaviors.

Decision making:

The Queen must decide:
- When to hibernate (if in doubt, hibernate)
- When to stop hibernation (if in doubt, sleep in longer)
- If a prey community is becoming too much of a threat
- Which pray community to cull and when

The Keepers must:
- Gather information to give to the Queen
- Plan feeding patterns?

The wraithbots must:
- Note anything interesting
- Make periodic stops at the hive if the are out feeding

Hive information flow:

The wraithbots return to the hive periodically to check up on hibernation status etc. and give interesting information to the Keepers. The wraithbots will also go back to the hive if they see something worth reproting.
The Keepers wander the map and report locations of prey communities, prey populations veg concentrations, worker progress etc. to the Queen.
The Queen processes the information

In/Out:

In/Out will be used extensively for communication, and a special 'hivebot language' may well have to be developed, consisting of in/out sequences. Something like:

1) Wraithbot puts 1 in .out1 to catch a Keeper's attention
2) Keeper replies by putting 2 in .out1
3) Communication begins in earnest:

Code: [Select]
            out2   out3   out4   out5
             64     83     91     53

"Defend the hive!" (just so you get the idea)

4) Keeper puts 3 in .out1 to say that it has recieved the communication
or
5) Keeper puts 4 in .out1 to ask the wraithbot to repeat the communication

A lot of flexibility here too


*****************************************


Now how to code all that into a bot? - that's what you're here for  :D

If you have any ideas or are just interested then you can start thinking about how to code hivebot and playing with ideas straight away.
If you want to work on a specific section of Hivebot then say so when you first post.


You MUST share information on this project. If you have an idea then tell it to the rest of us.

[span style=\'font-size:14pt;line-height:100%\']KEEP THIS THREAD TIDY [/span]

And try to keep this thread on topic please.


 :P


*****************************************


Assignments (I will add to this as more people get involved):

Henk: I'm pretty sure that I want you to work on the Prey Species (see above)  :)

Ulciscor: Can you do the wiki? (ie. maintain the page about Wraithbot/Hivebot - one already exists, copy and paste the relevant sections of this post into it etc.)  :)

Numsgil: Yep, you can help fitting code together during the later stages and orgainsing the code-writing  :)

PY: Thanks anyway  :) . You can lend some moral support and help with some little bits of coding when you get time.

If any of you have any good ideas about this project just PM me  :D


Jobs to do (I will add to this over time):

- Work on communication and the 'hivebot language' - any volunteers?
- Work on decision making and gathering information, especially the Keepers' gathering information on the Pray Species  - any volunteers?
- Work on generic survival code for the hivebots (reproduction, fighting, self-sufficiency etc - I'll probably do this once the basic hive routines are complete etc.)
- Work on setting the different types of hivebot and 'electing' the queen (highest nrg bot?) - any volunteers?

Go here (http://forum.darwinbots.com/index.php?showtopic=1092) if you're particularly interested in the bot communication and information gathering

UPDATE: Henk's just had a brilliant idea (see this thread) (http://forum.darwinbots.com/index.php?showtopic=1092) about hibernation. We now don't have to use 'conditionless coding' for hibernation - the vegs will sustain the hibernating wraithbots

UPDATE: Praybot v1 is out. Take a look (http://forum.darwinbots.com/index.php?showtopic=1095)


Fingers crossed  :)
Title: Community project (now pretty much defunct)
Post by: Griz on January 27, 2006, 03:50:19 PM
PY's Ants

ran this in non-toroidal mode with a small amount of gravity ...
pretty cool.
but as I like the physics in 2.4 more ...
ran it there as well.
seems all the queens end up going 'out of bounds' and then
doing nothing.  any idea why that might be?
any way to code the dna of the bot to not go out of bounds?
btw, I do use the smallest res screen ....
is the hive location 'locked in'?
and might it be outside of the smallest dimensioned screen?

tanks
Title: Community project (now pretty much defunct)
Post by: Elite on January 27, 2006, 04:09:59 PM
On the topic of ants and v2.4:
Try Black Ant, It's easier to get started than PY's ant but 'borrows' a lot of the concepts and coding from it, and lacks the oh-so-interesting queen-conversion ability.
I have 2.4 but never use it because it seems so unbelievably buggy, I'm waiting for a stable release  :)


Anyone else want to help with the project (http://forum.darwinbots.com/index.php?showtopic=1091)  :) ? What about you Griz?
Title: Community project (now pretty much defunct)
Post by: Griz on January 27, 2006, 06:03:16 PM
Quote
On the topic of ants and v2.4:
Try Black Ant, It's easier to get started than PY's ant but 'borrows' a lot of the concepts and coding from it, and lacks the oh-so-interesting queen-conversion ability.
I have 2.4 but never use it because it seems so unbelievably buggy, I'm waiting for a stable release  :)


Anyone else want to help with the project (http://forum.darwinbots.com/index.php?showtopic=1091)  :) ? What about you Griz?
I would be of no help programming dna at this point. ;)
but do hope via this project to learn a bit about it.

I might be able to assist a bit with the wiki ...
that I have some experience with ...
but limited time to spend online in the immediate future.
seems that pesky real life stuff kinda cuts into it. ;)
let me know what you need wikiwise and I'll see.
I did go ahead and put your opening 'community project' spiel there.
Title: Community project (now pretty much defunct)
Post by: Elite on January 27, 2006, 06:05:53 PM
Thanks for that, I was wondering who that was  :D

I've updated it with all the new info. You are welcome to watch and help with the wiki.

Aren't antbots cool  :)
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 28, 2006, 08:41:04 AM
Quote
seems all the queens end up going 'out of bounds' and then
doing nothing. any idea why that might be?

Could be screen sizes. Ant-Bot 5 is designed to work in size 3 best. If you run a smaller size then the queen may try to leave the screen when she decides where her nest will be.

the nest location is determined randomly with x and y coordinate maxima matching the size 3 dimensions
Title: Community project (now pretty much defunct)
Post by: Elite on January 28, 2006, 09:56:00 AM
Go here (http://forum.darwinbots.com/index.php?showtopic=1091) to participate in the project (+ lots of information about halfway down)

 :help:

Go here (http://forum.darwinbots.com/index.php?showtopic=1093) to see who's doing what and how the project is organized

 :D

And go here (http://forum.darwinbots.com/index.php?showtopic=1092) to make suggestions concerning hivebot communication, information gathering and (x, y) location stuff. If you have any ideas then just say, you don't need to know how to program bots to make good suggestions.

 :D

Come on. I need your help!!!  :help:
Title: Community project (now pretty much defunct)
Post by: Griz on January 28, 2006, 03:49:35 PM
Quote
the nest location is determined randomly with x and y coordinate maxima matching the size 3 dimensions

I figured maybe.
24000 x 18000 is size 3 ...
16000 x 12000 for #2
while size one is 9237 x 6928
where is that set in the code?
 
I find this in gene 2 for new queens:

3 .type store
14000 rnd 100 add .queenx store
10000 rnd 100 add .queeny store

which, if this is it, would work in both size 2 and 3.

if I alter this to  say ... 9000 and 6500 will that do it?

I wonder if the code could be written to sense
what size the field is upon intializing the bots ...
so they could be run in any size?

thanks
Title: Community project (now pretty much defunct)
Post by: Elite on January 28, 2006, 04:02:27 PM
Got the same problem with wraithbot

I haven't found a way of sensing field size but it would be a good idea. The problem is that the coordinates cannot exceed 32000.

Suggestion - need some new sysvars:
.fieldx
.fieldy

 :D
Title: Community project (now pretty much defunct)
Post by: Griz on January 28, 2006, 04:23:26 PM
Quote
Got the same problem with wraithbot

I haven't found a way of sensing field size but it would be a good idea. The problem is that the coordinates cannot exceed 32000.

Suggestion - need some new sysvars:
.fieldx
.fieldy

 :D
that would be slicker.

anyway, altering those values seems to work.
also increased the feeders velocity from 10 to 30 to speed things up
and have to recall how to have a bot turn when it reaches a border
in the non-toridal versions or the feeders just butt their heads.
with just a hint of gravity, and the veggies repopulating only at
the top, they end up as a layer on the bottom with the hives usually
higher and swifter ants cruising down and returning with food.
fun to watch.
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 28, 2006, 05:43:04 PM
Quote
I find this in gene 2 for new queens:

3 .type store
14000 rnd 100 add .queenx store
10000 rnd 100 add .queeny store

which, if this is it, would work in both size 2 and 3.

if I alter this to say ... 9000 and 6500 will that do it?

Yup that's the gene. And you are right. they will work in size 2 also. That alteration will make them work fine in size one.
Seriously though, they are way better in bigger sizes.


Quote
Got the same problem with wraithbot

I haven't found a way of sensing field size but it would be a good idea. The problem is that the coordinates cannot exceed 32000.

Suggestion - need some new sysvars:
.fieldx
.fieldy

Yes that would be a pretty good idea. Easy to implement and not using up any resources since it can be set as a fixed value at the birth of the robot. This also gives you the option of screwing with a bot by telling it other values than the real ones. Maybe set ranges that way.

As for not exceeding 32000, I am going to make the variables all "double" soon so that will no longer be an issue with the next version. No plans on when yet. Too darn busy lately.
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on January 28, 2006, 05:44:25 PM
Quote
and have to recall how to have a bot turn when it reaches a border

*.edge returns 1 when the robot hits a border. Resets every round so the cycle after it will be 0 again.
Title: Community project (now pretty much defunct)
Post by: Griz on January 28, 2006, 07:14:52 PM
Quote
Quote
and have to recall how to have a bot turn when it reaches a border

*.edge returns 1 when the robot hits a border. Resets every round so the cycle after it will be 0 again.
yup. got it.
added it to the ants ...
otherwise in toridial mode, they just bump into a wall ....

'looking for borders
cond
 *.eye5
 -1
  !=
start
314 rnd 157 sub .aimdx *.edge mult store 'rnd turn left or right 45 degrees
stop


and in 2.4, as the body size gets larger/more massive ...
 they go 'outside' the field ... and unless they have some
sort of turning thing, never come back in.  
I still haven't fingered out why Num's enabled that to happen.

I prefer the small field of play and not so many bots ...
otherwise those ants certainly do 'crawl' along.
I set them to 30 vel too, instead of 10.

using version 2.4 now, as I like the physics ...
and it seems pretty stable.

couple questions:

what's the difference between a worker and a warrior?

what is the purpose of fixing a feeder's position if it is not feeding a queen?

the queens often don't reproduce if their feeders
happen to 'buy it' and not get back to them.
there is a gene for them to repro if nrg < than 2000 but I don't see it happen.
they just continue to lose energy until <500 and then have 100 added.
and they eventually die too, not sure how.

seeing as I am using non-toridal and a bit of gravity ...
most of my veggies are near the bottom.
so I want to have the newborns tend to head towards
the bottom to search for food, rather than randomly go in
any direction.
assume this would be .setaim:

' worker selects direction to head after birth
cond
*.robage 10 =
start
1256 rnd .setaim store
stop

1256 covering all angles ....

looks like 0/1256 is to the right ...
314 is up, 628 left, and 942 down ...
so to get a range of 90 degress down ...
45 to -45 degrees from straight down I would need:

314 rnd 785 add .setaim store    yes?

I tried it and it works ...
but might as wll leave this here for others who may
be lurking and know as little as I. ;)

anyway, watching the project and coders ...
and playing with these ants ... who knows ....
I may finger some of this out yet.

so I hope no one minds my asking questions.
would like to have a wiki page for questions like this as well
thinking it is much easier to talk there and not lose where in
some thread someone said what ...
but I don't think many people visit it. yet. ;)
we will see.
Title: Community project (now pretty much defunct)
Post by: Numsgil on January 28, 2006, 07:45:13 PM
As to why bots manage to go outa bounds in 2.4:

It's a consequence of how the physics engine works.  Hard constraints are difficult.

In the port I've implemented yet another way in which the engine works which allows me to do both 'hard' constraints (bots CANNOT leave the arena) and softer constraints (bots are pushed into the arena if they leave).  I'm pleased with the results so far, and I think everyone else will be too.
Title: Community project (now pretty much defunct)
Post by: Griz on January 28, 2006, 08:24:04 PM
Quote
As to why bots manage to go outa bounds in 2.4:

It's a consequence of how the physics engine works.  Hard constraints are difficult.

In the port I've implemented yet another way in which the engine works which allows me to do both 'hard' constraints (bots CANNOT leave the arena) and softer constraints (bots are pushed into the arena if they leave).  I'm pleased with the results so far, and I think everyone else will be too.
cool.
I do enjoy the more realistic physics except for this ...
just seems they go too far ...
I can envision the borders being 'springy' or 'elastic' ...
as long as they get pushed back, or rebound ...
but they do seem to get stuck on the other side and
'out of play' on occasion.
I suppose with hard constraints you would have to
take the bots radius into cosideration, but don't know.
I would think their 'center' would be able to be more
realistically 'reflected', so that no bot, regardless of
size, would every have it's center pass outside the limit.
obviously, you've played with it and would do that if there
was a way to do so. ;)

how's the port coming?

what would be a good compiler to obtain?
I would like to begin to learn C++ ...
and DB is certainly the most interesting program ...
so this would provide good motivation ...
esp with you guys around to sort out problems that
are common to all users.

DB us pretty cool Nums ...
thanks for all the work.
I know you love doing it, so it's not all work for you ...
but I understand it takes a lot of effort and commitment.
so thanks for all you've done.
Title: Community project (now pretty much defunct)
Post by: Numsgil on January 28, 2006, 10:09:39 PM
Personally I like MSVC 6.0 (which you can get from the FTP under tools)

Other people swear by Dev-C++ (which is downlaodable outside the FTP.  Google)

Either/or really.

I'm done with everything in the core engine except mutations, shots and ties.  I still need to implement the basic GUI controls (they exist but they don't do anything yet) and debug it like crazy.  I'm also extremely exhausted and sick of looking at the code, so I'm taking some time off at the moment to learn something called Ogre3D.

I'd say there's like another 100-200 man hours of work to get to a beta version.  I'm aiming for the end of February but I'm not 100% certain if I'm going to make it or not.

If you're looking to learn C++ I'd recommend getting a physical book instead of learning it through some online tutorial.  I've purposely tried to keep the source as straightforward and simple as possible, so it shouldn't be too hard for a "newbie" to see what's going on where.
Title: Community project (now pretty much defunct)
Post by: Welwordion on April 13, 2006, 05:37:05 AM
Just a thought, but maybe the queen should be a batterybot or more like tieing a veggie reserve to it,
that way the hive could repopulate the world with veggies without having to rely on extern repopulation and it also could try to maintain a better distribution of veggies.

Oh and if we talk about veggie reserve, how about a "bot" reserve? the swarm could try to make "prisoners"
bots that are disabled and forced into some kind of hibernation and if the other species of bots have driven themself to extinction the prisoners would be freed to repopulate the world?
Title: Community project (now pretty much defunct)
Post by: Henk on April 13, 2006, 09:52:44 AM
That's a good idea!

Gotta think about that one...
Title: Community project (now pretty much defunct)
Post by: Elite on April 13, 2006, 10:57:45 AM
OK, seen as there's interest again

Nice idea Welwordion

How about having the bots hunt at night, so that their prey (and vegs) can be repopulated in the daytime
Title: Community project (now pretty much defunct)
Post by: Welwordion on April 13, 2006, 11:55:40 AM
I did not even know their was a day and night cycle ^^
Title: Community project (now pretty much defunct)
Post by: Welwordion on April 18, 2006, 02:02:43 PM
Say how is the hive supposed to know the amount of food remaining?
Will the keepers just start the hibernation after some set time or does it count something like the encounters of food per x cycles?
Title: Community project (now pretty much defunct)
Post by: PurpleYouko on April 18, 2006, 04:06:13 PM
Quote
I did not even know their was a day and night cycle ^^
Sure there is. It's been there for ages. Haven't you ever noticed the little sun/moon icon that changes every now and then in the top right of the screen?

just use *.daytime to read back the current day/night state. 1 means day and 0 means night.
Title: Community project (now pretty much defunct)
Post by: maheshjr2000 on May 21, 2006, 01:24:54 PM
um I may be new but I have experience in coding in JAVA and C++ and I think that this is a pretty cool idea so I wanted to help out.
Title: Community project (now pretty much defunct)
Post by: maheshjr2000 on July 05, 2006, 09:25:53 PM
Hmm How are you guys going about determining which bot is a keeper?
I also agree with making the queen a battery bot. How bout giving her a hibernation mode too?