Author Topic: Arrays other topic  (Read 15007 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays other topic
« Reply #15 on: February 23, 2005, 03:47:27 PM »
Quote
Has anyone ever had success with in-line comments? It might be that they never worked, and we (atleast Bots and I) keep thinking they do.

:unsure: ok

Now how about making in-line commands actualy work? so robots can (I am repeating again) "naturaly evolve them"

About time eh?

thanks for staying with me so far Num because next we will Tackle:
Quote
*20
*22
add
20
store

and while we will be at it will check sub and squrt and all the rest of them...
 ;)
« Last Edit: February 23, 2005, 03:49:27 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #16 on: February 23, 2005, 03:51:43 PM »
I'll look at the parsing code for comments.

Note that you can't evolve comments, because comments are stripped from DNA when it's loaded into the program.  Comments just help us humans handle abstract DNA code.

instead of:
*20
*22
add
20
store

you can use the wonderful new 'addstore' command.

Like this:

*22 20 addstore

I think.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Arrays other topic
« Reply #17 on: February 23, 2005, 03:52:47 PM »
NOOOOO!  :o

Num is going to beat me to 100 posts  :(

 :ph43r:  PY  :ph43r:
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Arrays other topic
« Reply #18 on: February 23, 2005, 03:54:48 PM »
Quote
NOOOOO!  :o

Num is going to beat me to 100 posts  :(

 :ph43r:  PY  :ph43r:

Ah Crud. He just did.

 :wacko: PY  :wacko:
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #19 on: February 23, 2005, 03:56:39 PM »
Bow before me, pawn!

Mwahahaha!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays other topic
« Reply #20 on: February 23, 2005, 03:59:31 PM »
:huh: But please fix the inlines I was talking about please ;;

Are you saying robots can evolve "addstore" but cant evolve "add" "div"

This "addstore" in my opinion just makes everything more confusing

how about then we add

"divstore"

"substore"

"multstore"

"squrtstore" ' means a ^ b

??

or we just use good old "store" and add "squrt"

??

Ok I know its all confusing but hey I live for danger

 :D Bau  :D

I suggest evolve "add" and "sub" and "squrt" and the rest of it...

I suggest fix the program so my originaly posted dna works...
« Last Edit: February 23, 2005, 04:03:11 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Arrays other topic
« Reply #21 on: February 23, 2005, 04:01:52 PM »
NO!!

Inline comments don't work!

They have to be at the start of a line.

Not sure why but they have never worked.


Quote
The two stores you noticed is my brain collapsing. Pay no mind to the man behind the curtain. 


What that weird little man over there shouting into the megaphone and twiddling knobs and stuff?

 :D  PY  :D
« Last Edit: February 23, 2005, 04:03:35 PM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #22 on: February 23, 2005, 04:02:12 PM »
Have you checked out the DNA commands I added in 2.35?

Check the readme.  They're all listed there.

When I said inline comments don't work, I mean inline comments don't work.

That is:

.a .b store 'blah blah comment

doesn't seem to work, but

.a .b store
'blah blah comment

does work.

The DNA all loads and runs correctly.  The comments that are on the same line as DNA code seems to be loaded in as 0's.
« Last Edit: February 23, 2005, 04:02:31 PM by Numsgil »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #23 on: February 23, 2005, 04:05:26 PM »
And its sqr, not squrt.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays other topic
« Reply #24 on: February 23, 2005, 04:07:20 PM »
Rofl ok I think PY and Num is completly confused , who is talking about "commants" here? I am talking about suggestions to fix the actual prossesing of the program

Some one read what we all wrote please
 :(


OK OK its "sqr" not squrt" , how about we just replase it all with actual signs

Quote
+
-
*
/
^

good one ?
« Last Edit: February 23, 2005, 04:09:17 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #25 on: February 23, 2005, 04:10:01 PM »
Bots, you said:
Quote
I suggest fix the program so my originaly posted dna works...

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.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Arrays other topic
« Reply #26 on: February 23, 2005, 04:10:35 PM »
Quote
Are you saying robots can evolve "addstore" but cant evolve "add" "div"


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
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #27 on: February 23, 2005, 04:10:47 PM »
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.
« Last Edit: February 23, 2005, 04:12:04 PM by Numsgil »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays other topic
« Reply #28 on: February 23, 2005, 04:18:13 PM »
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
« Last Edit: February 23, 2005, 04:20:12 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays other topic
« Reply #29 on: February 23, 2005, 04:20:17 PM »
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

and

Quote
'23 is the pointer to memory location 22
« Last Edit: February 23, 2005, 04:22:01 PM by Numsgil »