1. Re: artificial life program - Travis
- Posted by John McAdam <john.mcadam at MAIL.TELEPAC.PT>
Jun 25, 2000
-
Last edited Jun 26, 2000
>Ok, got ur stuff. Nice. I cant do much of the intelligence, but check =
this
>out (alp5.ex) And your program caused an error (cw.err)
>This version of Alp5 doesn't have ANY artificial life stuff in it yet.
>I'm converting to an Managed Operating System setup...
>Check it out. Will send updates as they are made available.
Travis,
Looking at alp004.ex code I see:
Before calling the main function the mtn() function is called.
the mtn() function maybe does something to the map?
Another routine called before main is newworld(). It also calls mtn() =
and does something to temp[map].
The program calls the main() function then resets the graphics mode and =
ends
The main function initializes some variables then calls the iniprog() =
function
Iniprog sets some variables including a complex sequence called lbufer. =
then clears the screen and redraws() the windows and the lines around =
them and their
current info.
Then main gets user input keys: esc, up dn lf rt, 'r' (run toggle), '-' =
'_' (down layer), '=3D' '+' (up layer), '?' (help), 'i' (init), 'z' =
(zero), 'd' (delay factor), 'k' (kill), 't' (track), 'v' (view =
lifeform), 'n' (new map), and unknown. unknown aparently includes [E]dit =
lifeform, [L]oad World, [Q]uit and [S]ave World.
Main then does parselife() which sets some variables then operates on =
the lbuffer sequence. perhaps life-buffer? anyway it has things like =
pos, color, energy, age, status, etc. an interesting thing is status 8 =
which gives birth to a baby. it does a lot of other updating stuff as =
well. especially if being tracked.
after a delay, main then sets the timer and redraws the screens.
Running the program I can move around on the map with the arrow keys. =
but when the life form crawls off the top (it
always goes up) of the screen it doesn't appear on the next
screen above (north). the up and down level keys work in
that they give me black map screens. the delay works. a
good delay is a couple thousand. The run toggle works but
is labeled the opposite of what it really is. the track key
says it is tracking but nothing seems to happen, even
though I tried numbers 0 to 9, whatever that means. I don't
understand what tracking is supposed to be doing. I don't
understand what the life form is supposed to be doing. The
maps are beautiful.
I don't understand what alp005.ex is supposed to be doing.
What are you trying to do with the lifeform and where do
you think outside help would be useful. I hope I don't
sound critical, I'm enthused and trying to understand.
My program often causes the causeway crash but I don't know why (or I'd =
fix
it). I don't know what a Managed Operating System is.
JOHN