Code center > Suggestions

Arrays other topic

<< < (6/8) > >>

Numsgil:
Bots, you said:

--- Quote ---I suggest fix the program so my originaly posted dna works...
--- End quote ---

The reason your posted code didn't work is cause the comments were being parsed when they shouldn't

Just post your comments on spereate lines and they'll work.

PurpleYouko:

--- Quote ---Are you saying robots can evolve "addstore" but cant evolve "add" "div"
--- End quote ---


No he isn't saying that at all.

A robot can evolve [span style=\'font-size:14pt;line-height:100%\']ANY[/span] command at all. It will almost alway just appear as a number though.

Example:

A robot evolves a .mrepro command where .repro used to be.
Where previously it had been

50 .repro store

it will now be

50 301 store

Make sense?

All the mutation code does is to randomize a new number. ANY number. If the sysvar has a numeric equivalent then it CAN be mutated.

 :D  PY  :D

Numsgil:
sqr has no sign for it, except that funny radical symbol, so how can we use a symbol for it in the DNA?

the power function uses ^ though.

Botsareus:
Thats how its called , its called the "power function" so we can use somthing like "pow" or just change everything into the actual symbols like:
+ - * / ^

anyway I am talking about stuff like:
add sub mult div pow

I WANT IT TO MUTATE IN THE PROGRAM , BUT I AM NOT SURE IF IT WORKS CORRECTLY YET BECAUSE EVEN:

cond
*20
0
=
start
20
21
store '21 is the pointer to memory location 20
store
1
22
store
22
23
store '23 is the pointer to memory location 22
stop

cond
start
20
inc
stop

cond
*20
100
>
start
0
*21
store
stop

end

NOTICE THIS IS THE VIRSION WITHOUT "DEF" BECAUSE THATS HOW IT WILL LOOK LIKE IF IT ACCURES NATURALY (MUTATES) WILL LOOK LIKE

DOES -*- NOT -*- WOOOOORK!!!!!!!!!
HEEEELLLLLPPPPP!!!!!!!

DONT REWRITE IT WITH DEFS AGAIN PLEASE!!!!!!!

THE VIRSION WITH "DEF" NUM GAVE ME WORKS GOOD , THATS NOT THE POINT

Numsgil:
Alright Bots, listen very closely.

Remove the comments from your code.  Put them on their own lines.  Either way, pick one and do it.  Your code will now work again.

In case there's confusion over what comments are, these are the comments in your code that are screwing it up:


--- Quote ---'21 is the pointer to memory location 20
--- End quote ---

and


--- Quote ---'23 is the pointer to memory location 22
--- End quote ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version