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.


Messages - Lorgar

Pages: [1]
1
DNA - General / Re: DNA language
« on: May 13, 2011, 11:45:09 AM »
ok, after some thinking, I would say : the use of the boolean stack in action blocks reduce significantly the size of the gene and allow to combine several genes in one.
I do not know the nrg cost of looking into the boolean stack during an action.

not using the boolean stack at all would be better (if just looking in it cost something) but would make for much longer genes, that would be a weakness against mutation...

2
DNA - General / Re: DNA language
« on: May 10, 2011, 08:34:01 AM »
ok, I understand, the advantage of this writing is the combinations of three genes in one.
now, what would they be over this way of writing : (not using the boolean stack)
Code: [Select]
cond
start
-2. shoot *.eye5 40 sub sgn add abs div mult store (if *.eye 5 40 > shoot what's in front)
stop

What are the pro and cons? :huh:
(edit) I would like to know when and why I would be better off using boolean stack maneuvers instead of integer stack ones. Since both knows no conditions they both save the condition reading price. I gather that in THIS lay all their interest..?

3
DNA - General / Re: DNA language
« on: May 09, 2011, 01:54:00 PM »
so, the problem is, how can I create the right combination of boolean command to combine two genes in one.
like this
Code: [Select]
cond
*.eye5 0 =
start
'look around
stop

cond
*.eye5 0 !=
*.refeye *.myeye !=
start
'jump at the foe
stop

cond
*.refeye 0 =
start
'eat the lettuce
stop
end
can I make some code like
Code: [Select]
cond
*.eye5 0 !=
*.refeye *.myeye !=
*.refeye 0 =
start
'eat the lettuce
else jump at the foe
else look around
using boolean commands?

edit : yes I can, as described in the tuto, but I do not understand How you build all the dropbool, and, not structure beforehand. Using tables? I would like to know the design process step by step...

4
DNA - General / Re: DNA language
« on: May 09, 2011, 05:57:01 AM »
I understand this, but when an action take place, will it automaticaly delete the top value of the boolean stack?
If when reaching start there are two or more values on the boolean stack, first action will use the first, delet it then use the second for the second action?

5
DNA - General / Re: DNA language
« on: May 08, 2011, 06:37:10 AM »
I read it, but cant grasp a thing  :(
http://darwinbots.com/WikiManual/index.php/Inline_Conditions_Tutorial
first :
Can not see how the boolean stack work, do store action "use" the upper unit of the boolean stack? or does it remain un changed after the action has been made? What is the clearbool command use (if the boolean stack is cleared at the end of the cycle?) how do you make sure that this boolean value should be merged with this one to be used in the last statement, if they are not different? I printed it, read through and through for days but cant understand how you use it.

what I do not understand is all the complicated use of dupbool command, overbool etc, if a boolean value is not deleted when an action is made, why bother dup it if it stay where it is? why reduce the size of the boolean stack  if it is cleared after stop command? why not only use simple not command when you need an else?

If the boolean is evaluated before any action, does this evaluation delete the top unit of the boolean stack?
I read the tutos but still... (yes when I will have understood that I feel that I will be able to understand the tuto about conditionless bots).
why am I so stupid?

6
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.

7
Untagged bots / Re: Chariotbot
« on: May 06, 2011, 11:12:07 AM »
interesting, what about adding some guns and armour?  :D

8
DNA - General / Re: newbie robot
« on: May 04, 2011, 01:48:13 AM »
ok, panda, look at this one!
 8)
Code: [Select]
'orkyboy

def tgtpoison 50
def tgtvenom 51
def tgtslime 52
def tgtshell 53
def tgtparalyzed 54
def tgtma 55

'tie to parent
cond
*.robage 0 =
start
.tie inc
*.tiepres .tienum store
stop

'untie
cond
*.robage = 1
start
*.tienum .deltie store
 stop


'movement genes


cond
 *.eye3 *.eye5 >
start
 -30 .aimdx store
stop

cond
 *.eye7 *.eye5 >
start
 30 .aimdx store
stop

cond
*.eye5 0 =
*.refeye *.myeye = or
start
314 rnd .aimdx store
stop

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refxpos *.refypos angle .setaim store
*.refveldx .dx store
*.refvelup 30 add .up store
stop


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

cond
 *.venom 30 <
 *.nrg 2000 >
start
 30 *.venom sub .strvenom store
 .up .vnloc store
 0 .venval store
stop


'venom shoot
cond
*.eye5 =!
*.refeye *.myeye !=
start
 *.memval .tgtID store
 .up .memloc store
 *.memval .tgtma store
 .paralyzed .memloc store
 *.memval .tgtparalyzed store
 .shell .memloc store
 *.memval .tgtshell store
 .poison .memloc store
 *.memval .tgtpoison store
 .slime .memloc store
 *.memval .tgtslime store
stop


cond
 *.eye5 20 >=
 *.refeye *.myeye !=
 *.tgtma 0 =!
 *.tgt paralyzed 0 !=
 *.tgtshell 0 =
 *.tgtpoison 0 =
 *.tgtID *out1 =
start
 -3 .shoot store
stop


'attackshoot

cond
 *.eye5 20 >=
 *.refeye *.myeye !=
 *.tgtshell 0 =
start
 -6 .shoot store
stop

'nrg shot
cond
*.eye5 20 >=
*.refeye *.myeye !=
*.tgtpoison 0 =
start

stop

'feeding genes
cond
 *.eye5 0 !=
 *.refeye *.myeye !=
 *.tgtslime 0 =
start
  50 rnd .tie store
 *.tiepres .tienum store
 -6 .tieloc store
 -1000 .tieval store
stop


'anti leach gene
cond
*.tiepres *.tienum !=
start
*.tiepres .deltie store
stop


'reproductive gene
cond
 *.nrg 6000 >
 *.body 800 >
 *.eye5 40 <
start
 50 .repro store
stop


'shell gene
cond
 *.slime 20 <
start
 20 *.slime sub .mkslime store
stop

'poison gene
cond
 *.poison 10 <
 *.nrg 2000 >
start
 10 *.poison sub .mkpoison store
 .shoot .ploc store
stop


end

9
DNA - General / Re: newbie robot
« on: May 02, 2011, 04:10:34 PM »
A virus infected bot would use all his body and nrg to produce little poisoned bots that create ties and stay together, sharing slime (to protect them from another virus infection) they would react with poison and/or venom if attacked by a bot without a specific gene added to all my bots.
something like this (101 being the memory address and 13 the specific gene) I assume the presence of an aiming gene to aim at the attacker

cond
*.hit 0 !=
*.bodloss 0!=
*.ref101 13 !=
start
-3 .shoot store
stop

these little beings would be "stockbots" just fortifying themselves to protect whatever body and nrg point they have until some of my bots come around to eat them. What they would do without being hindered by poison (either using -6 shots or just not being seen as foes) or venom.

edit, where can I find a good MB tuto?

10
DNA - General / Re: newbie robot
« on: May 02, 2011, 01:45:40 PM »
I want to make it more resilient. What about a paralel virus based reproduction system? what defense should I put up first (as shell, poison, venom or slime are costly I may have to choose wich one to implement first, taking into account the energy and waste management system)

11
DNA - General / Re: newbie robot
« on: May 02, 2011, 05:43:03 AM »
It was thought like this : if one gene is activated, the others are not, mult delete one value of the stack and replace it by 40/-40 etc, wich is then taken and stored in .aimdx.

did not work well, so I nuked it. now it's like this :
 
Code: [Select]
'orkyboy
'orkybot

'tie to parent
cond
*.robage 0 =
start
.tie inc
.tienum inc
stop

'untie
cond
*.robage = 1
start
.deltie inc
stop


'movement genes
cond
 *.eye5 0 =
 *.eye3 0 =
 *.eye7 0 =
 *.numties 0 =
start
 314 rnd .aimdx store
 15 .up store
stop

cond
 *.eye3 *.eye5 >
start
 -30 .aimdx store
stop

cond
 *.eye7 *.eye5 >
start
 30 .aimdx store
stop

cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refxpos *.refypos angle .setaim store
*.refveldx .dx store
*.refvelup 30 add .up store
stop


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

cond
 *.venom 100 <
 *.nrg 3000 >
start
 100 *.venom sub .strvenom store
 .up .vnloc store
 -2 .venval store
stop


'venom shoot
cond
 *.eye5 20 >=
 *.refeye *.myeye !=
start
 -3 .shoot store
stop

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


'feeding genes
cond
 *.eye5 0 !=
 *.refeye *.myeye !=
 *.refbody *.mybody =<
start
  1 .tie store
stop

cond
 *.numties 0 !=
start
 .readtie

'reproductive gene
cond
 *.nrg 8000 >
 *.body 800 >
 *.eye5 40 <
start
 50 .repro store
stop

cond
 *.numties 0 >
 *.trefeye *.myeye !=
start
 -1 .tieloc store
 -1000 .tieval store
 1 .tienum store
stop



'shell gene
cond
 *.shell 100 <
start
 100 *.shell sub .mkshell store
stop

'poison gene
cond
 *.poison 100 <
 *.nrg 2000 >
start
 100 *.poison sub .mkpoison store
 .shoot .ploc store
stop

cond
 *robage 0 >
start
 1 .deltie store
stop

end

12
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]