Code center > Dead-End and Solved Suggestion Requests

Arrays

(1/5) > >>

Numsgil:
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.

MightyPenguin:
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.

Numsgil:
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.

Botsareus:
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

Anonomous Guest Person:
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: ----1 7 store
--- End code ---
, it'd be
--- Code: ----1 14 12 store
--- End code ---
. (Just as a random example. Of course, a programmer would more likely use
--- Code: ----1 .shoot store
--- End code ---
, 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.

Navigation

[0] Message Index

[#] Next page

Go to full version