Author Topic: Arrays  (Read 10037 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays
« on: February 20, 2005, 04:11:47 AM »
I'd like to propose splitting the 1000 memory locations into 20 arrays of 50 elements each.

Arrays 1,2 are for custom labels and bot specific memory locations
Arrays 3-11 are for eyes 1 through 9
Array 12 is for Internal Self Information
Array 13 is for External Self Information
Array 14 is for Self Commands
Array 15 is for tierefs
Array 16 is for tiecommands

That leaves 4 arrays for future developments.  Every sysvar would be put into one of these arrays.

The advantage lies in the fact that now we can look at more than just what's in front of us.

Something like:

cond
*.eye3(.refeye) *.myeye !=
start
blah...
stop

The sysvars could be arranged so that *.myeye refers to InternalInfo(.myeye), so the arrays could be transparent to the bot programmer if they like.

This is mostly a way to organize the sysvars.  Understanding which sysvars are for reading data from and which are for writing data too can be confusing some times.

Offline MightyPenguin

  • Bot Destroyer
  • ***
  • Posts: 189
    • View Profile
Arrays
« Reply #1 on: February 20, 2005, 07:31:00 AM »
I like it. But how is this going to affect the sysvars text?

EDIT: also, you'd need to give people a crash course in handling arrays. It's fine for programmers, but what about some poor schmuck Who hasn't got a clue about what an array is.
« Last Edit: February 20, 2005, 07:34:04 AM by MightyPenguin »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays
« Reply #2 on: February 20, 2005, 06:23:29 PM »
The sysvars would need to be rewritten, but once done I don't suppose they should mean anything different to the bot programmers than they did before.

Aye, a crash course in arrays would be needed.  I think basic programming should be a required course in elementary school.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays
« Reply #3 on: February 21, 2005, 04:08:03 PM »
Dim memory(1000) as Intager 'this actualy already Exists in the program

Do '<--- this loop is the robot stack loop itself
memory(0) = 0
Do
memory(memory(0) + 100) = 999 - memory(0)*2 '<--- inpossible in the current virsion
If memory(0) > 100 Then Exit Do
Loop
Loop

***Can you later add the ability for the DNA to store values in arrays , not in memory one by one

***And Robots will be able to mutate all this stuff naturaly

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
Arrays
« Reply #4 on: February 21, 2005, 04:23:53 PM »
If you add arrays, it could, and probably would, make some bots obsolete.
Especially mutated bots...!

And as a related result, mathematics will be much different.
Especially if you use that format.
For example, what if you wanna make super-advanced, super-efficient genes.

And if you're still dead for using arrays, then I suggest we keep to the current system, and simply add a new stack option.
So instead of
Code: [Select]
-1 7 store, it'd be
Code: [Select]
-1 14 12 store. (Just as a random example. Of course, a programmer would more likely use
Code: [Select]
-1 .shoot store, but I see no major advantage of having an array with such a simple programming language. The only real advantage is that each eye would be able to get information, which might make bots too deadly.
And even that advantage could be simulated with the current system.)

Though if you mean to simply organize all the system variables, by all means do so if you really want to.
And that'd only leave three arrays, to he who started this topic. Remember racial information? For most bots, those system variables are completely untouched, but without them, it's a real pain to make bots that're based on origin and family rather then species.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays
« Reply #5 on: February 21, 2005, 04:35:22 PM »
A.G.P. whats wrong with complexity , array complexity is what makes it possible to design programs like DB in the first place.

As for -1 20 63 store , I dont use thouse I even dont know what you are talking about
If I would want to store 20 into memory 10 based on information in memory 6 were memory(6) = 10 I will write

20
*.*6 'pointer from memory6 to memory10
store


somthing like that ; all we did in this example was add a new "*.*" command

What does "rasial information" have to do with anything? what does that have to do with arrays? (Am I being Rasist?)

Quote
make bots too deadly
there is no sutch thing as a too deadly bot, the only way a bot becomes unbeatable is if takes up all the DNA space possible with considaration of energy and uses ever letter of it perfictly
« Last Edit: February 21, 2005, 04:44:06 PM by Botsareus »

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
Arrays
« Reply #6 on: February 21, 2005, 05:25:34 PM »
Ahem. I said "might make bots too deadly".
That "might" is very important. Without it, I seem very clear that that'll happen, with it, it's simply very probably that that'll happen.
And by racial information, I mean the system variables 971-990.
(Though they are racial memory, but that's besides the point....)
And it's -1 14 12 store. I was basing it on the very first post, and I assumed that .shoot would be placed in the 14th array, and randomly picked 12 for it's location in that array.
« Last Edit: February 21, 2005, 05:27:07 PM by Anonomous Guest Person »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays
« Reply #7 on: February 21, 2005, 05:38:40 PM »
Quote
very probably that that'll happen.

I dont think so , I already explained: There are always going to be stronger bots until and only until the limits of the program are reached. , If that happens we eather remove somthing or add on somthing to the program to make further insanity possible  :D

Quote
-1 14 12 store
will make a lot of bots no longer able to function because they use "-1 76 store" if say 76 was a .shoot
if we have -1 14 12 store the program will go: "WTH DOES 12 MEAN WHEN THERE IS SUPPOSED TO BE A STORE  THERE"
if we say to the program read the 12 next time it will go:
ex: -1 76 store
It will go "OK WERE IS THAT NUMBER 12 BEFORE ThE STORE"

(I love writing replys :) )

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
Arrays
« Reply #8 on: February 21, 2005, 05:44:51 PM »
I suppose so. Though any bot that uses viruses, or .delgene as a weapon is rather close to that limit.
Which is why the programmers're making better defenses against viruses (I hope!), and are probably gonna remove an evil little trick my superpowered bot of underpopulated doom uses as a primary weapon.

And -1 14 12 store would work, even in the current system!
It's store 14 in the memory location 12, and leave the -1 on the stack. :P

*Loves to argue, buahaa.
Even though he's not very good at it. <_<*

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Arrays
« Reply #9 on: February 21, 2005, 05:48:02 PM »
This is a qustion for PY and NUM not for AGP

***Can you later add the ability for the DNA to store values in arrays , not in memory one by one

***And Robots will be able to mutate all this stuff naturaly

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays
« Reply #10 on: February 21, 2005, 06:33:41 PM »
Quote
I suppose so. Though any bot that uses viruses, or .delgene as a weapon is rather close to that limit.
Which is why the programmers're making better defenses against viruses (I hope!),
I've seen your bot, that nasty little .delgene .tieloc store.  Yuck.  Had Ymir up the wall till I added slime to his adult form.  Nice work.

Some slime (alot of it actually) renders that weapon invalid, so I don't think it's too much of a problem.  The other illegal delgene weapons should all now have a counter.  Except the venom one.  I may need to rethink the venom defenses.

In the next version, venom is traded with poison.  That is, the venom is accepted and a poison shot is released as well.  Maybe I need to make this like how energy shots work instead.

Then we could reallow all delgene weapons, as they move from unstoppable to annoying.

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
Arrays
« Reply #11 on: February 21, 2005, 06:38:45 PM »
You could make robots return poison when certain memory locations are set.
Or perhaps, if it's not already in, make it so that shots and ties change memory locations BEFORE it reads all the DNA.
Though if it doesn't already work that way, that could prove very difficult to do.
But if it already works that way, .delgene defenses could be really easy to set up.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays
« Reply #12 on: February 21, 2005, 06:43:25 PM »
All good points.
  • Old Bots may become invalid.
  • The sysvars will be sorted (it's kind of a mess right now, if you didn't' notice)
  • There will be designated memeory ranges that sysvars will never invade.  Currently bots have to find a spot to store their own variables amidst the mess of sysvars.  Having an actual range that is guarenteed is definately a good thing.
  • Refvars for different eyeX's would be a major leap forward for bots.  Currently there isn't really room in the sysvars to do this without shoe horning it all over the place.  Also, their names would become very long.  eye4refvelscalar certainly is a mouthful.  Arrays should help make this more readable
  • Memory location in array 5 subscript 3 could be also reffered to as 253 (50 * 5 + 3).  This way the arrays are nearly transparent to the users if they like.
---------------
An alternate idea would be to create a seperate area for the eyes, outside of the usual 1000 memory locations.
---------------

Bots that use this new eye stuff could be alot stronger than current bots.  But I don't think it gives an unfair advantage.  New bots can use this new eye stuff too.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Arrays
« Reply #13 on: February 21, 2005, 06:45:49 PM »
Quote
You could make robots return poison when certain memory locations are set.
Or perhaps, if it's not already in, make it so that shots and ties change memory locations BEFORE it reads all the DNA.
Though if it doesn't already work that way, that could prove very difficult to do.
But if it already works that way, .delgene defenses could be really easy to set up.
Currently it seems that shots and ties change values after the execution of the DNA.  I'm not sure, I haven't really looked into it.  PY would never better than I.

I like the idea of the info shots and tie locs being hard to defend against except with external defenses.

Offline Anonomous Guest Person

  • Bot Builder
  • **
  • Posts: 85
    • View Profile
Arrays
« Reply #14 on: February 21, 2005, 07:28:16 PM »
True. And there are almost too many defenses already. It's not that difficult to have a super defense bot which is nearly impossible to harm!

And also, I think that all the system variables should be reorganized.
This will take a LOT of work, but it may be worth it.
And perhaps we can say variables from 991 to 1000 are user variables?
Or perhaps 20-100?