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 - Lorgar

Pages: [1]
1
DNA - General / DNA language
« on: May 07, 2011, 04:25:46 PM »
If I understand well; you can write a bot dna like this
cond
*.eye5 0!=
*.refeye 0 =
start
'deal with veggie
stop

start
*.eye5 0 !=
*.refeye *.myeye !=
*.refeye 0!=
start
'kill the dreaded foe with much bloodshed and slaughter
stop

cond
*.eye5 0 !=
*.refeye *.myeye =
start
'move away from siblings
stop
end

Or you can write it like this
start
If *.eye5 0 !=
 If *.refeye *.myeye !=
  if *.refeye 0 =
   start 'deal with veggy
   else deal with foe
  else 'deal with family
Else 'look around
stop
the problem is that I can not figure how I can translate it using "clearbool, dupbool, etc"
I dunno if I wrote it well, I did not use elseif things. If you see a mistake in either code, please point it out.

2
DNA - General / newbie robot
« on: May 01, 2011, 02:31:07 PM »
Ok, I have been through the tutos many times. (and even now, some subtle uses of info shot are still out of reach). I tried to make a small bot. Hubris was greatly rewarded, my boyz were wiped clean by the "animal minimalis" bots I introduced. shame and anger. After a lil bit of work I made this :

'orkyboy
cond
 *.eye1 0 =
 *.eye5 0 =
 *.eye9 0 =
start
 mult 314 rnd
stop


cond
 *.eye1 *.eye5 >
start
 mult -40
stop

'idem oeil5
cond
 *.eye9 *.eye5 >
start
 mult 40
stop


'set aim
cond
start
 .aimdx store
stop

cond
 *.refeye *.myeye !=
 *.eye5 20000 <
start
 15  .up store
stop

'waste shoot
cond
 *.waste 800 >
start
 -4 .shoot store
stop

'attackshoot
cond
 *.eye5 0 !=
 *.refeye *.myeye !=
 *.refdist 1 <
start
 -1 .shoot store
stop

cond
 *.trefeye *.myeye =
 *trefnrg 100 = or
start
 *.tienum .deltie store
stop


'feeding genes
cond
 *.eye5 5000 >
 *.refeye *.myeye != and
 *.tienum 3 < and
start
  1 .tie store
  1 .tienum store
 -6 .tieloc store
 -1000 .tieval store
stop


cond
 *.robage 0 =
start
 *.tienum .deltie store
stop


'reproductive gene
cond
 *.nrg 6000 >
 *.eye5 40 <
start
 -180 .aimdx store
 25 .repro store
 180 .55 store
stop
end

it does manage to survive and thrive competing with animalminimalis, but cant do a thing about more evolved bots. What can I do to make it work better? what mistakes did I make coding its dna? how can I make him create energy sharing ties with his comrades AND taking body points from enemy ties-targeted bots?

looking forward for an answer...
btw, strange thing, I may be tired but it seems that the "newbie-section-presentyourself" disappeard when I loged in after register...
Am I seeing things?

Pages: [1]