Tie Feeder Tutorial

From WikiManual
Revision as of 05:48, 1 August 2007 by Elite (talk | contribs)
Jump to: navigation, search

Here is Tie-bot 1

' Tie-Bot 1

cond
*.eye4 *.eye6 !=
start
*.eye4 *.eye6 sub .aimsx store
stop
cond
*.vel 40 <
start
40 *.vel sub .up store
stop
end

Available as Tie-Bot1.txt


I have made him this simple to demonstrate an alternative method of using the eye cells to search for food. Notice that all we do is compare the two eye cells either side of *.eye5 (straight ahead), then actually store the resulting difference into .aimsx (rotate left).

Tie-Bot2.txt)


Tie-Bot3.txt

Tie-Bot4Tie-Bot4 a little to see what would happen if you were to do either of those things. Just play around a little before you come back to see how I plan to fix this.

I will eventually use a similar method to that employed by Simplebot but for the moment I will leave reproduction the way it is. You will see why a little later on.


Tie-Bot5.txt

cond
start 
1 .tie store
stop

This is a really stupid gene but demonstrates some of the difficulties associated with tie feeders.

Tie-Bot5

Obviously we need to be a little more careful about when and where we shoot ties. We also need a way to feed through the ties once they are attached. First we need to add a condition or two to the gene that fires the ties. Change the gene to this. Note that we now have 10 eye cells so you will also need to change the other instances of .refeye to 10 as well.

cond
*.eye5 30 >
*.refeye 10 !=
start 
1 .tie store
stop

Tie-Bot6.txt

cond
*.numties 0 >
start
-1 .tieloc store
-1000 .tieval store 
*.tiepres .tienum store
stop

The condition *.numties tells the DNA how many ties are currently attached to the robot. In this instance no attempt is made to feed unless at least one tie is detected.


? .refeye


The console output window should now read:

? .refeye 708-> 0


cond
*.robage 0 =
start
3198 rnd 2 add 55 store
stop



*.refeye 0 !=


*.refeaimdx 0 !=


This is a real problem. Hey here is a thought. Those eye cells are always equal to 77 when a new robot is born so we could add this line.

*.eye5 77 !=

Tie-Bot7.txt

We still get the occasional two robots joined together by red ties but they are few and far between now. Another problem is in the way that Tie Bot breeds. We get large chains of young ones all fixed together so they are les effective than robots such as Devincio Eversor (also included in the tutorial directory). Try running Tie Bot 7 against Devincio Eversor

.tie inc

and then to add an entirely new gene to follow it..

cond
*.robage 1 =
start 
.deltie inc
stop

Tie-Bot8.txt


We can stop this either by making the targeting routine more accurate or by deleting the tie if it is attached to a friend. Lets try both.


*.eye4 *.eye6 =


*.eye5 30 <


'!!!rework to add in myeye references

14 56 store

Tie-Bot9.txt

Well Tie Bot 9 seems to work pretty good but it still does the same thing as before. We need to delete those ties I think.


*55 .readtie store

This will allow us to read the tref variables from the robot that we are tied to. We only need to use this line once since the value is never reset until we set it ourself. We will now be able to read values through the tie that corresponds to the value in *55. Next we will add a new gene..

Cond
*.trefeye *56 =
start
*55 .deltie store
stop

Tie-Bot10.txt

Devincio Eversor to see just how good Tie Bot is getting now.


Slime

cond
*.slime 90 <
start
100 .mkslime store
stop

You will find the new version as Tie-Bot11.txt

Slime actually reduces the overall efficiency but gives a tie feeder a much better fighting chance when facing others of similar persuasion. We fan now only reach a population of around 320.

As before with simplebot, there are still a number of things that we could do to make Tie-Bot even stronger. I will leave you to figure out what they are. A robot that can beat Devincio Eversor is quite good enough for a tutorial. There are many ways to create a tie-feeding robot as good as Tie Bot 11 This tutorial follows but a single path that was chosen for its differences from the methods used in Simplebot. As you can see from this tutorial, the possibilities are almost endless. I expect to see a whole bunch of new and stronger robots out there in the F1 league soon.

Tie Feeder counter