Bots and Simulations > Bot Tavern
The Wraithbot
Elite:
The ideas behind the wraithbot :-
- Decimate their prey then withdraw to hibernate
- 5% are non-hibernating, sterile Keepers
- The rest hibernate at the hive for 1000nds of cycles at a time while their prey repopulates
- Carnivorous - don't eat veggies unless desperate
- Very aggressive
Here's where we discuss and (hopefully) assemble the code for Wraithbot
I suggest making wraithbot based on Preybot - Preybot is similar in that it shares antbot-like hive tendancies.
What we've got:
- Hibernate by tieing together in a blob and using the breakage of ties to wake the hive via *.numties
Hmm...
So where do we start?
:help:
Griz:
--- Quote ---5% are non-hibernating, sterile Keepers
--- End quote ---
how do we go about ensuring that is so?
are you talking about reproduction producing these 5% of the time, then?
or is this a target number we are shooting at for the ecosimulation when
it is 'stable' and viable as a whole?
the starting, or end ... game?
Elite:
When a new wraithbot is born, it has a 5% chance of becoming a keeper:
--- Code: ---cond
*.robage 0 =
start
19 rnd sgn -1 mult 1 add .keeper store
stop
--- End code ---
- that sort of thing
Griz:
--- Quote ---When a new wraithbot is born, it has a 5% chance of becoming a keeper:
--- Code: ---cond
*.robage 0 =
start
19 rnd sgn -1 mult 1 add .keeper store
stop
--- End code ---
- that sort of thing
--- End quote ---
ok. that was my question.
at the start ...
and something that might be adjustable, or perhaps even evolve ...
should the sim seem to require a different value.
I guess ideally, it would evolve ...
what works continues ... what doesn't ends ...
assuming these keepers will reproduce.
question
19 rnd sgn -1 mult 1 add .keeper store
what is the 19?
and how does one then get 5%, 0.05 ... from this?
thanks
Elite:
[number] rnd generates a random number between 0 and [number]
19 rnd generates a random number between 0 and 19, meaning that the chance of getting 0 = 1 in 20 (5%)
I then sgn it, making the chance of a 1 95% and the chance of a 0 5%
I then invert the result using -1 mult 1 add (1 becomes 0, 0 becomes 1) and 5% of all robots will have 1 stored into .keeper at birth
BTW, the keepers are sterile and don't reproduce. New keepers are produced when the normal bots repro. When a bot reproduces the chance of it's offspring becoming a keeper is 1 in 20, or 5%.
:D
Navigation
[0] Message Index
[#] Next page
Go to full version