Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - MacadamiaNuts

Pages: 1 2 [3] 4
31
Evolution and Internet Sharing Sims / Linux Internet Sharing
« on: September 22, 2007, 06:42:57 PM »
If you don't mind, I'll keep this thread for the blueprints about how to use Linux command-line scripts to set up FTP sharing.  

This is what I've got for now.

This pattern goes in a file called .netrc, with permissions set with chmod go-rwx, at home/username

Quote
machine  anyserver.anynet.net
login    username
password blahblah

These two Linux scripts, put in the sharing folder, retrieve and upload dbo files from and to the FTP server. This would work with the organisms cached by offline teleporters. I still don't know how to limit the amount of files uploaded and downloaded, besides setting a small size limit for the FTP account.

dbupload
Quote
#! /bin/sh
sudo ftp <<**
open anyserver.anynet.net
cd darwinbots
bin
mput *.dbo
bye
**
rm ./*.dbo

dbdownload
Quote
#! /bin/sh
sudo ftp <<**
open anyserver.anynet.net
cd darwinbots
bin
mget *.dbo
mdelete *.dbo
bye
**

Both them need to be made executable with chmod ugo+x. This would already work as "manual ftp sharing", if I didn't miss anything I should know about the ftp command.

Now, I would need to figure how to loop them.

32
Bugs and fixes / Duh, IM graph error under Wine/Linux OPEN
« on: September 20, 2007, 06:59:52 PM »
I know, I know, it would be too much to wish the VB branch worked flawlessly under Linux.

Actually, it does, but for the Internet Mode. The 43e - 43j versions throw an 'ActiveX error: could not create object'  when they update the internet population graphs. Normal graphs don't throw any error, nor does 43d -tho it drops the connection all the time-,

I still remember a bit from my VB days. Does the new graph use a control that wasn't being used before? I could look for a missing or better dll if I know what it needs.

Otherwise, I guess I'll need a hardcoded workaround, like a text mode population statistic or an option to disable the graph.

Or a Gambas port.  

33
Single store / Animal_Archaea 1.1 (SS)(MacadamiaNuts) - 02.09.2007
« on: September 02, 2007, 11:00:58 AM »
Improved with shooting and aiming. And still with only one store.  

Code: [Select]
'Animal Archaea 1.1
 'Author: MacadamiaNuts, 10.08.2007
 'Description: SS bot. It calculates first the value, any else genes are false once the first one true is found. Then it uses the same 1G conditions to drop the proper sysvar into the stack. It consumes less energy with F1 conditions than multiple store bots, and the simulation will run somewhat faster. Also it's very picky about which mutations it tolerates.
 
 start
 
 'VALUE BLOCK
 
 0
 
 dup sgn abs 1 sub abs
 *.refxpos *.refypos angle *.eye5 55 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult *.refxpos *.refypos angle 60 div abs *.aim 60 div abs sub sgn abs mult  *.numties sgn 1 sub abs mult 1000 *.refnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 -6 *.eye5 55 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult *.refxpos *.refypos angle 60 div abs *.aim 60 div abs sub sgn abs 1 sub abs mult
 mult add
 
 dup sgn abs 1 sub abs
 600 600 *.eye5width sub sgn mult
 mult add
 
 dup sgn abs 1 sub abs
 50 *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 *.tiepres *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 99 *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 1 *.numties sgn 1 sub abs mult *.eye5 50 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult 750 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 100 *.eye5 sub 2 div abs 1 add 10 *.velup sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 10 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
 mult add
 
 'SYSVAR BLOCK
 
 0
 
 dup sgn abs 1 sub abs
 .setaim *.eye5 55 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult *.refxpos *.refypos angle 60 div abs *.aim 60 div abs sub sgn abs mult *.numties sgn 1 sub abs mult 1000 *.refnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .shoot *.eye5 55 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult *.refxpos *.refypos angle 60 div abs *.aim 60 div abs sub sgn abs 1 sub abs mult
 mult add
 
 dup sgn abs 1 sub abs
 .eye5width 600 *.eye5width sub sgn mult
 mult add
 
 dup sgn abs 1 sub abs
 .repro *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .deltie *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .sharenrg *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .tie *.numties sgn ~ abs mult *.eye5 50 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult 750 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .up 10 *.velup sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .strbody 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
 mult add
 
 'STORE
 
 store
 stop

34
Simulation Emporium / Maca's ecosystem challenge
« on: September 02, 2007, 10:24:35 AM »
 

This is my own challenge proposal:

To set up and run a stable ecosistem with as much different non-friendly species as you can put together. Each species must have a clearly different DNA and behaviour (if you want an extra challenge, pick only bots from the Bestiary), and be able to reproduce whenever they reach an energy threshold. Symbiosis is not allowed. Parasiting -stealing energy from the host without directly killing it- is ok. Mutations may be disabled. The field size should be 24k x 32k at most, and they should be able to run 1 million cycles without any extinction. Costs of your choice.

35
Evolution and Internet Sharing Sims / Templated blank bot
« on: August 12, 2007, 07:45:06 PM »
If you get bored of evolving zerobots, you may try this one (or a variation of it) with mutations disabled.

Code: [Select]
cond
*990 0 =
start
998 rnd 530 rnd 2 div abs 1 add 971 store
998 rnd 530 rnd 2 div abs 1 add 972 store
998 rnd 530 rnd 2 div abs 1 add 973 store
998 rnd 530 rnd 2 div abs 1 add 974 store
998 rnd 530 rnd 2 div abs 1 add 975 store
998 rnd 530 rnd 2 div abs 1 add 976 store
998 rnd 530 rnd 2 div abs 1 add 977 store
998 rnd 530 rnd 2 div abs 1 add 978 store
998 rnd 530 rnd 2 div abs 1 add 979 store
998 rnd 530 rnd 2 div abs 1 add 980 store
998 rnd 530 rnd 2 div abs 1 add 981 store
998 rnd 530 rnd 2 div abs 1 add 982 store
998 rnd 530 rnd 2 div abs 1 add 983 store
998 rnd 530 rnd 2 div abs 1 add 984 store
998 rnd 530 rnd 2 div abs 1 add 985 store
998 rnd 530 rnd 2 div abs 1 add 986 store
998 rnd 530 rnd 2 div abs 1 add 987 store
998 rnd 530 rnd 2 div abs 1 add 988 store
998 rnd 530 rnd 2 div abs 1 add 989 store
998 rnd 530 rnd 2 div abs 1 add 990 store
*.thisgene .delgene store
stop

cond
1000 *.kills 1 add mult rnd 5 =
start
971 19 rnd add inc 999 ceil store
stop

cond
1000 *.kills 1 add mult rnd 10 =
start
971 19 rnd add dec -6 floor store
stop

cond
*.fixed 1 =
start
0 .fixpos store
stop

cond *971 *972 * > start *973 *974 * store stop
cond *971 *972 * = start *974 *975 * store stop
cond *971 *972 * < start *975 *976 * store stop

cond *973 *974 * > start *973 *974 * store stop
cond *973 *974 * = start *974 *975 * store stop
cond *973 *974 * < start *975 *976 * store stop

cond *975 *976 * < start *977 *978 * store stop
cond *975 *976 * > start *978 *979 * store stop
cond *975 *976 * = start *979 *980 * store stop

cond *977 *978 * < start *977 *978 * store stop
cond *977 *978 * > start *978 *979 * store stop
cond *977 *978 * = start *979 *980 * store stop

cond *979 *980 * < start *981 *982 * store stop
cond *979 *980 * = start *982 *983 * store stop
cond *979 *980 * > start *983 *984 * store stop

cond *981 *982 * < start *981 *982 * store stop
cond *981 *982 * = start *982 *983 * store stop
cond *981 *982 * > start *983 *984 * store stop

cond *983 *984 * = start *985 *986 * store stop
cond *983 *984 * < start *986 *987 * store stop
cond *983 *984 * > start *987 *988 * store stop

cond *985 *986 * = start *985 *986 * store stop
cond *985 *986 * < start *986 *987 * store stop
cond *985 *986 * > start *987 *988 * store stop

cond *987 *988 * > start *989 *990 * store stop
cond *987 *988 * = start *990 *971 * store stop
cond *987 *988 * < start *971 *972 * store stop

cond *989 *990 * < start *977 *978 * store stop
cond *989 *990 * > start *978 *979 * store stop
cond *989 *990 * = start *979 *980 * store stop

end

36
DNA - General / The & operator
« on: August 11, 2007, 12:12:01 PM »
I just passed by the wiki and seeing there wasn't any page for the & operator picked this online sci calc:

http://ostermiller.org/calc/calculator.html

and listed some results:

http://www.darwinbots.com/WikiManual/index.php?title=%26

I just found the & operator can be used to create looping functions using a constant value.

For example:

*.robage 3 & 1 add .tienum store

That would loop through ties 1, 2, 3 and 4.

37
Single store / Animal_Archaea (SS)(MacadamiaNuts) - 10.08.2007
« on: August 10, 2007, 01:01:58 PM »
A new one store bot with a different approach. This one can live forever. It can be expanded to include any kind of genes, with the only restriction of one operation per cycle and top genes having priority always over lower genes:

Code: [Select]
'Animal_Archaea 1.0
 'Author: MacadamiaNuts, 10.08.2007
 'Description: 1S bot for ecosims -it doesn't kill veggies-. It calculates first the value, any else genes are false once the first one true is found. Then it uses the same 1G conditions to drop the proper sysvar into the stack. It consumes 0.10-0.05 energy per cycle with F1 costs.
 
 start
 
 'VALUE BLOCK
 
 0
 
 dup sgn abs 1 sub abs
 600 600 *.eye5width sub sgn mult
 mult add
 
 dup sgn abs 1 sub abs
 50 *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 *.tiepres *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 95 *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 1 *.numties sgn 1 sub abs mult *.eye5 50 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult 750 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 100 *.eye5 sub 2 div abs 1 add 10 *.velup sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 10 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
 mult add
 
 'SYSVAR BLOCK
 
 0
 
 dup sgn abs 1 sub abs
 .eye5width 600 *.eye5width sub sgn mult
 mult add
 
 dup sgn abs 1 sub abs
 .repro *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .deltie *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .sharenrg *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .tie *.numties sgn ~ abs mult *.eye5 50 sub sgn 0 floor mult *.refeye *.myeye sub sgn abs mult 750 *.trefnrg sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .up 10 *.velup sub sgn 0 floor mult
 mult add
 
 dup sgn abs 1 sub abs
 .strbody 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult
 mult add
 
 'STORE
 
 store
 stop

38
The Gene depository / Lionfish's genes explained
« on: August 10, 2007, 10:06:12 AM »
I think it may be useful to explain here each piece of our own code, specially for those starting in 1G coding.

Here the bot:
http://www.darwinbots.com/Forum/index.php?showtopic=2168

Lets go at it...

The Self-Mutation Engine

Code: [Select]
cond
start
1 971 store
6000 972 store
50 973 store
50 974 store
100 975 store
10 976 store
stop

cond
start
*972 3 rnd 2 sub add 31900 ceil 972 100 rnd 99 sub 0 floor mult store
*973 3 rnd 2 sub add 5 floor 973 500 rnd 499 sub 0 floor mult store
*974 3 rnd 2 sub add 1 floor 974 500 rnd 499 sub 0 floor mult store
*975 3 rnd 2 sub add 0 floor 975 250 rnd 249 sub 0 floor mult store
*976 3 rnd 2 sub add 0 floor 976 500 rnd 499 sub 0 floor mult store
stop

Memory locations 971-990 are racial memory and they are inherited by offspring, so we store there key numeric values like amount of energy before reproduction, energy share during reproduction, max speed, etc.

The second block changes those values slowly over time, like point mutations do. I gave faster mutation rates to bigger values (500 rnd 499 sub 0 floor mult = 1 change chance each 500 cycles). You may mutate the variables at .robage = 0 too to simulate copy errors.

Robage-Id gene

Code: [Select]
*.robage 1 add .out1 store
anything wherever *.in1 *.refage sub abs sgn 1 sub abs mult store

The first gene makes the visible variable in1 match the visible age of the bot. This way out1 keeps changing, is unique for each bot and can't be copied by other simple bots.

Then, we add the id check whenever needed. If they are equal, the sgn will return 0, otherwise will return 1.

Pack movement genes

Code: [Select]
*.refveldx .dx *.eye5 sgn mult store
*.refaim *.aim sub 2 div *.aim add .setaim *.eye5 sgn mult *.in1 *.refage sub abs sgn 1 sub abs  mult store

The first gene matches lateral movement of visible targets. This is really important either for following friendly bots or hunting enemy bots.

The second gene matches gracefully (or should) the friendly bot's aim. Packs don't trail each other, but move in the same direction.

Nine-eyes aiming

Code: [Select]
-40 *.eye9 sgn mult -30 *.eye8 sgn mult add -20 *.eye7 sgn mult add -10 *.eye6 sgn mult add 10 *.eye4 sgn mult add 20 *.eye3 sgn mult add 30 *.eye2 sgn mult add 40 *.eye1 sgn mult add .aimsx store
There are many versions of this really old gene in the bestiary, check them. Basically, the purpose is to help the bot to get any object in the lateral eyes into the focus eye (eye5). You can store negative values in .aimsx. This gene adds and substracts amounts for each eye with anything in focus to allow it to aim at wider groups too. It makes packs more compact.

Instant aiming

Code: [Select]
*.refxpos *.refypos angle .setaim *.in1 *.refage sub abs sgn mult *.eye5 sgn mult store
Another old gene. You get the coordinates of the non-friendly bot and calculate the aim angle. Note the id check, and the eye5 check (it would aim at the upper left corner if there wasn't anything on sight!). Note that currently (for 2.43a) this gene doesn't work for coordinates bigger than 32000.

Limited speed

Code: [Select]
50 *.velup sub .up store
This gene will move forward your bot only the needed amount to reach a forward speed of 50. Note there isn't a limit here for lateral movement. You won't really need to limit lateral speed as long as you are changing it somewhere else or using fixpos.

Unfix and value restores

Code: [Select]
0 .fixpos  store
0 .eye5dir store
0 .eye5width store

Add those three genes at top of the code and they will keep your bot unfixed and with proper focus eye aiming and width. You can change the values later in the code.

Spatial awareness gene

Code: [Select]
1200 .eye5width 4 rnd sgn 1 sub abs mult store
This is a very neat gene. For instant aiming and tieing the best is a full circle eye5, but full circle isn't good at all when you are surrounded of friendly bots, and you only need to instant aim or tie once. So here we check everything around the bot only once each 4 cycles on average.

Defensive cloud

Code: [Select]
1200 rnd .aimshoot 60 *.eye5 sub sgn 0 floor mult store
This gene shots randomly around when there isn't anything nearby on focus. This is very effective if you are using venom, because it works on big, fast bots that trample over yours.

Venom blinding and strvenom killer exploit

Code: [Select]
.eye5width .vloc store
.eye5dir .vloc 1 rnd mult store
.strvenom .vloc 1 rnd mult store
1000 .venval store

These genes set up venom shots. 50% of them will make the other bot to waste its energy storing the max amount of venom, then 25% will change its focus eye aim and 25% its focus eye width.

Selective shooting

Code: [Select]
-3 .shoot *.nrg 1000 sub sgn 0 floor mult store
-3 .shoot *.in1 *.refage sub abs sgn mult *.eye5 60 sub sgn 0 floor mult store
-6 .shoot *.refeye sgn 1 sub abs  mult *.eye5 60 sub sgn 0 floor mult store

The first gene will shoot venom only if the bot has more than 1000 energy. That's necessary if you are using the defensive cloud of shots, which is quite expensive.

Then, the second gene may override first if there is a non-friendly bot very close.

The third gene will shoot body feeding shots instead, if the bot that is close has zero eyes. That will be either an alga or a bot ruined by a virus.

Selective tieing

Code: [Select]
77 .tie *.numties sgn 1 sub abs mult *.in1 *.refage sub abs sgn mult *.eye5 50 sub sgn 0 floor mult *.refage sgn mult store
100 .fixlen store
40 .stifftie store

This gene ties if:

a) the bot hasn't got any tie yet, to keep it clean.
B) the target isn't friendly.
c) the target is close.
d) the target isn't a newspawn.

Then, the other two keep the tie short and stiff.

Target lock

Code: [Select]
1 .fixpos *.in1 *.refage sub abs sgn mult *.eye5 65 sub sgn 0 floor mult store
This gene will fix your bot when a non-friendly bot is within shooting range, thus nullifying any excessive speed.

Reproduction

Code: [Select]
1256 rnd .setaim *.nrg 6000 sub sgn 0 floor mult store
50 .repro *.nrg 6000 sub sgn 0 floor mult store

Just 1G versions of classic reproduction genes. These activate when nrg is bigger than 6000.

Venom and poison stores

Code: [Select]
100 *.venom sub .strvenom store
100 *.poison sub .strpoison store

These will keep 100 units of venom and poison stored and save energy when they are full.

Body maintenance

Code: [Select]
*.nrg 10 div *.body sub .strbody *.nrg 1000 sub sgn 0 floor mult store
*.body 10 mult *.nrg sub .fdbody store

Classic genes with a little twist. When energy is below 1000, wasting it to make the bot bigger is a very bad idea.

Waste management

Code: [Select]
*.waste .shootval *.waste 100 div abs sgn mult store
-4 .shoot *.waste 100 div abs sgn mult store

Here is a different way to check if a value is over a threshold. 100 div abs sgn returns 1 only if the value is bigger than 100. Put these genes at bottom of the code. When waste is over 100, they will override any other shoot command and shoot the excessive waste instead.

Share exploits

Code: [Select]
95 .sharenrg store
99 .shareslime store
99 .shareshell store

These are the fastest way to transfer energy from the target to your bot, but be careful with your offspring if you use 99 .sharenrg.

Poison setup

Code: [Select]
.shoot .ploc store
Share exploit - inverse

Code: [Select]
*.tiepres .tienum store
.sharenrg .tieloc *.trefeye *.myeye sub sgn abs mult store
1 .tieval store

This does the same than 99 .sharenrg, but forcing the tied bot to do a 1 .sharenrg, as long as it isn't a friendly bot.

Untie friends

Code: [Select]
*.tiepres .deltie *.trefeye *.myeye sub sgn abs 1 sub abs mult store
Unties friendly bots.

Antivirus

Code: [Select]
*.thisgene 2 add .delgene store
*.thisgene 1 sub .delgene *.thisgene 1 sub sgn mult *.robage 10 sub sgn 0 floor mult store

Common antivirus, here for a 3 genes bot that deletes its first gene after 10 cycles.

Virus

Code: [Select]
10 .vshoot *.vtimer sgn 1 sub abs  mult *.nrg 1000 sub sgn 0 floor mult store
*.thisgene 1 add .mkvirus *.vtimer sgn 1 sub abs  mult *.nrg 1000 sub sgn 0 floor mult store
stop

cond
*971 1 !=
start
*.thisgene 1 sub .delgene store
stop

This code shots virus as long as energy is over 1000. Remember that the shorter the virus, the faster the vtimer reloads. Here we use low energy virus (10), but shoot lots of them. The virus itself will check the racial memory for value 1 at 971 and, if it doesn't find it, will delete all genes.

39
Short bots / Lionfish (F1) (3G) MacadamiaNuts - 10.08.2007
« on: August 09, 2007, 09:32:44 PM »
It has code from Fishy and T_Mosquito and the self-evolving engine (as I wouldn't bother to optimize it manually), and has lots of interesting features aswell. You can get nice code for your bots here.

Sorry if it's a bit hard to read. There are genes overriding genes, like the fixpos ones, as I found easier to code the conditions that way. It got a bit complex after testing.  

I post it as 3G, but it becomes 2G after the first cycles. It would be 1G if 1G's weren't able to make lightweight virus.

I ran it through the old F1 league bots and did well, even against a less messy T_Mosquito version, which uses the same sharenrg and strvenom shoot "cheats". The pack behaviour clearly helped, even though I expected these fancy features to make it clumsier. It isn't very optimal, but it doesn't mind a lot being placed in big sims with scattered food.

I'm going to try and evolve it to see how prone it is to wreck those complex conditional genes.  

Code: [Select]
'Name: Lionfish 1.0
'Author: MacadamiaNuts 9 August 2007
'Description: F1-edition of Fishy bot, with DNA improvements from T_Mosquito and Optisim self-mutation engine.
'It is able to mutate and evolve certain values to find an optimal point even with mutations disabled.
'It uses the first gene to initialize the racial memory and then deletes it as it isn't useful anymore.
'When healthy, it casts a venom and virus cloud that confuses and kills nearby bots.
'It drops some activity when it falls below 1000 energy.
'It uses a simple random overriding series of genes to shoot different kinds of venom. Some of it messes with other bots eyes, which is a quite effective way to disable them. Most bots doesn't repair their own eyes.
'It uses Fishy's pack movement DNA. It's really good in a mid sized sim, healthy bots protect small ones and their pack behaviour helps them to defend and find targets. Quite amusing to watch, too.
'Note how it expands its field of view once each while to spot things around.
'Besides one tie check, it uses robage and racial memory to recognize friendly bots, so it's immune to many mimickizers, including Blue on Blue.

cond
start
1 971 store
6000 972 store
50 973 store
50 974 store
100 975 store
10 976 store
stop


cond
start
*.robage 1 add .out1 store

*972 3 rnd 2 sub add 31900 ceil 972 100 rnd 99 sub 0 floor mult store
*973 3 rnd 2 sub add 5 floor 973 500 rnd 499 sub 0 floor mult store
*974 3 rnd 2 sub add 1 floor 974 500 rnd 499 sub 0 floor mult store
*975 3 rnd 2 sub add 0 floor 975 250 rnd 249 sub 0 floor mult store
*976 3 rnd 2 sub add 0 floor 976 500 rnd 499 sub 0 floor mult store

*.refveldx .dx *.eye5 sgn mult store
*.refaim *.aim sub 2 div *.aim add 1220 mod .setaim *.eye5 sgn mult *.in1 *.refage sub abs sgn 1 sub abs mult store

-40 *.eye9 sgn mult -30 *.eye8 sgn mult add -20 *.eye7 sgn mult add -10 *.eye6 sgn mult add 10 *.eye4 sgn mult add 20 *.eye3 sgn mult add 30 *.eye2 sgn mult add 40 *.eye1 sgn mult add .aimsx store

*.refxpos *.refypos angle .setaim *.in1 *.refage sub abs sgn mult *.eye5 sgn mult *.refxpos sgn mult *.refypos sgn mult store
*973 *.velup sub .up  store
0 .fixpos store

0 .eye5dir store
0 .eye5width store
900 .eye5width 4 rnd sgn 1 sub abs mult store

1200 rnd .aimshoot 60 *.eye5 sub sgn 0 floor mult store
.eye5width .vloc store
.eye5dir .vloc 1 rnd mult store
.strvenom .vloc 1 rnd mult store
1000 .venval store
-3 .shoot *.nrg 1000 sub sgn 0 floor mult store
-3 .shoot *.in1 *.refage sub abs sgn mult *.eye5 60 sub sgn 0 floor mult store
-6 .shoot *.refeye sgn 1 sub abs mult *.eye5 60 sub sgn 0 floor mult store
77 .tie *.numties sgn 1 sub abs mult *.in1 *.refage sub abs sgn mult *.eye5 50 sub sgn 0 floor mult *.refage sgn mult store
100 .fixlen store
40 .stifftie store
1 .fixpos *.in1 *.refage sub abs sgn mult *.eye5 65 sub sgn 0 floor mult store
1256 rnd .setaim *.nrg *972 sub sgn 0 floor mult store
*974 .repro *.nrg *972 sub sgn 0 floor mult store
*975 *.venom sub .strvenom store
*975 *.poison sub .strpoison store
*.nrg 10 div *.body sub .strbody *.nrg 1000 sub sgn 0 floor mult store
*.body 10 mult *.nrg sub .fdbody store
*.waste .shootval *.waste 100 div abs mult store
-4 .shoot *.waste 100 div abs sgn mult store

95 .sharenrg store
99 .shareslime store
99 .shareshell store
.shoot .ploc store
.sharenrg .tieloc *.trefeye *.myeye sub sgn abs mult store
1 .tieval store
*.tiepres .deltie *.trefeye *.myeye sub sgn abs 1 sub abs mult store
*.tiepres .tienum store
*.thisgene 2 add .delgene store
*.thisgene 1 sub .delgene *.thisgene 1 sub sgn mult *.robage 10 sub sgn 0 floor mult store
*976 .vshoot *.vtimer sgn 1 sub abs mult *.nrg 1000 sub sgn 0 floor mult store
*.thisgene 1 add .mkvirus *.vtimer sgn 1 sub abs mult *.nrg 1000 sub sgn 0 floor mult store
stop

cond
*971 1 !=
start
*.thisgene 1 sub .delgene store
stop
end

40
Suggestions / .sharedna
« on: August 09, 2007, 03:05:48 PM »
.sharedna:

When two bots are tied and share DNA, both DNA are run for each bot behaviour.

That is, if you got one bot that reproduces, and another that fires, they'll both reproduce and fire, tho the copies will only inherit the parent's DNA.

The value stored is the weight of the bot DNA. The DNA with lower weight is run first, and its actions may be overridden by the more weightful DNA. For more than two bots, the tie to the bot with higher weight is the one that runs the shared DNA

41
Suggestions / 1G hardcoded operators
« on: August 06, 2007, 11:58:22 PM »
Hi, long time.  

I think it would help a lot the 1G school coders if we got some 1G style procedures hardcoded into macro operators. We could list some of our favourite operations to be included in next releases. This wouldn't break old bots, neither should be too complex to code, and if included in mutations would add up for interesting results. I really think evobots would love those operators.

In the long run, maybe even the logical stack and all old-school conditional coding could be deprecated for 1G macro coding. In the end, structured code doesn't seem to fit at all with evobots, and reading code for two different stacks is confusing. I bet sims would run faster too.  

Then, so, if I write for example:

start 50 .nrg *.nrg 3000 above store stop

When DB reads it, it would replace "above" by "sub sgn 0 floor mult", which is the 1G way to write:

cond *.nrg 3000 > start 50 .nrg store stop

So, please? please? please?  

42
The Gene depository / Randombot Generator
« on: June 18, 2007, 01:11:54 PM »
I wrote a simple php app to generate random code for "zerosims", here.

It prints a bunch of random numbers from 0 to 999 and some random asterisks too.  

A sample:

Code: [Select]
'#name: Randombot
'#author: Created with Randombot Generator
* 81 145 973 829 * * 740 751 804 337 50 781 776 208 675 119 115
633 167 490 786 233 442 528 937 520 951 181 281 675 472 812 996 848 *
338 * 931 367 380 621 762 * 713 486 724 116 349 494 908 785 995 *
836 629 430 100 327 193 575 119 362 134 345 538 954 68 475 262 250 515
900 732 477 860 563 70 975 970 250 604 989 233 867 775 * 291 288 529
384 376 18 508 332 914 964 258 * 932 877 899 916 944 574 244 235 467
718 182 156 577 861 69 414 436 801 944 622 432 739 288 376 648 * 830
736 336 588 616 751 56 419 987 * 875 212 245 590 257 716 69 573 811
* 149 5 356 944 454 913 807 682 728 13 441 67 322 852 * 973 502
509 69 348 27 758 88 179 969 525 805 387 100 935 283 723 622 190 805
536 818 329 536 418 873 826 721 762 143 40 607 212 996 921 941 633 752
666 472 795 27 24 836 570 484 407 * 619 369 244 * 701 723 767 743
474 586 161 251 397 978 431 975 5 174 542 992 148 698 106 155 981 83
* 335 * 157 * 588 608 511 567 449 531 61 392 353 132 814 18 227
98 511 610 * 219 235 * 774 974 269 553 12 495 * 310 860 247 366
725 835 309 319 181 319 355 27 178 404 184 927 569 763 2 * 727 877
25 872 114 889 609 898 693 405 773 706 523 32 496 * 223 260 904 648
306 364 * 878 513 665 351 872 707 551 737 902 * 780 48 572 159 599
57 * 134 974 543 238 382 812 685 982 669 368 302 622 213 599 559 139
336 * 879 733 822 108 365 739 327 321 296 999 588 896 60 465 944 249
18 120 663 597 886 981 330 590 678 924 91 594 * 59 373 155 657 *
497 547 * 433 811 762 * 389 829 62 134 71 715 936 132 * 271 509
1 903 36 83 830 188 150 686 636 142 58 * * 252 424 725 597 538
162 216 374 567 671 65 789 701 901 51 172 310 827 531 764 926 645 *
* 190 582 457 220 349 178 681 290 533 450 638 786 52 328 857 717 240
910 948 * 297 123 733 839 886 37 78 34 71 809 606 487 550 564 735
194 748 582 670 69 863 * 941 * 422 588 966 542 849 * 414 977 *
10 853 340 16 82 516 821 727 840 475 511 260 111 774 478 990 743 83
368 * 451 10 800 67 492 519 895 559 649 31 * 916 * 659 113 306
237 192 96 900 * 393 556 443 * 699 314 847 647 884 878 50 211 942

Hope this helps for evolving "zerosims".

This is the php code:

Code: [Select]
echo "'#name: Randombot<br/>";
echo "'#author: Created with Randombot Generator<br/>";


for ($n=1; $n<=30; $n++)
{
  
$I=1;
while($I<=18)
  {

  if (rand(0,10) == 1) echo "* ";
  else echo rand(0,999) . " ";
  

  $I++;
 }

echo "<br/>";

}

43
Interesting behaviour bots / Fishy (IB)(MacadamiaNuts)-11.06.07
« on: June 11, 2007, 03:42:57 PM »
Entering it for the bestiary.  


'Name: Fishy 1.0
'Author: MacadamiaNuts 11 June 2007
'Description: Turn your simulation into a fishtank!
'Watch them tailing each other and forming big masses of different size fish.

'FOLLOW THE MASS
cond
pain 0 =<
start
-10 *.eye9 sgn mult
-10 *.eye8 sgn mult add
-10 *.eye7 sgn mult add
-10 *.eye6 sgn mult add

10 *.eye4 sgn mult add
10 *.eye3 sgn mult add
10 *.eye2 sgn mult add
10 *.eye1 sgn mult add

*.aim add 1256 mod .setaim store

50 *.velup sub .up store
0 .fixpos store
stop

'MATCH SPEED
cond
*.eye5 0 >
start
50 *.velup sub .up store
*.refveldx .dx store
0 .fixpos store
stop


'MATCH DIRECTION
cond
*.eye5 0 >
*.refeye *.myeye =
start
*.refaim *.aim sub 2 div *.aim add .setaim store
stop

'FEED
cond
*.eye5 50 >
*.refeye *.myeye !=
start
-6 .shoot store
stop

'STOP FOR FEEDING
cond
*.eye5 65 >
*.refeye *.myeye !=
start
1 .fixpos store
stop


'DO LOTS OF LITTLE FISHIES
cond
*.nrg 30000 >
start
1256 rnd .setaim store
5 .repro store
stop

'MAINTENANCE AND EDGE CHECK
cond
start
*.nrg 10 div *.body sub .strbody store
*.body 10 mult *.nrg sub .fdbody store
*.waste .shootval *.waste 100 div abs mult store
-4 .shoot *.waste 100 div abs mult store
628 .aimdx *.edge mult store

44
Bot Tavern / Building a catch-eye bot
« on: June 11, 2007, 01:09:44 PM »
I think it would be good if we built a bot with the only purpose of showing interesting behaviours. Then put it in the default download with a nice background pic so it catches the eye for DB newcomers.

So, I open this thread to considerate genes that could produce those interesting behaviour. Later we can pick some of these and mashup them in some bots.

Self evolving bot ID gene
This gene makes the bots using out1 for ID fight occasionally.

cond
*.robage 1 =
start
*971 2 rnd 1 sub add 971 store
*971 *.out1 store
stop

Tailing
Bots that tail each other instead of avoid conspecs are always fun to watch. So no conspec check there.
I'm working on a better "follow the mass" gene.

cond
*.eye5 0 >
*.eye5 90 <
start
*.refxpos *.refypos angle .setaim store
stop

45
Evolution and Internet Sharing Sims / Mutation engine in bot code?
« on: June 08, 2007, 09:08:48 PM »
With optisim or optimization sim I mean an evolution that doesn't change the DNA, but optimizes certain values, like % repro, nrg before repro, etc. Normal mutations are disabled, and all the changes are made within bot code.

Basically, at born, the new bot would inherit the values through racial memory (defaulting them if it missed), and modify them slightly.

At the end of the sim, DNA would look the same, but values would have reached an optimal value for that enviroment.

Animal Minimalis could be a good one to start. It has only 7 values to optimize.

Pages: 1 2 [3] 4