Artificial Life in Rebol ?
[1/28] from: reboler:ifrance at: 27-Dec-2002 19:24
Hi List,
Is Rebol used in Articial Life?
I am interested in :
- cellular automata
- genetic algorythms
I don't remind seing even a simple "Game Of Life" programmed in Rebol.
I would be interesed if anyone know a "must have" book on that matter,
or can point me to a good place on internet to start with.
Next year, my daughter is likely to study what is called "Bio-informatique" in french,
so I would like to have some ground knowledge...
Patrick
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms
[2/28] from: ammon::addept::ws at: 27-Dec-2002 12:16
HI,
Not only has the Game of Life been written in REBOL, but somewhere
someone is working on genetical programming. ;-)
EnjoY!!
Ammon Johnson
CIO of Addept ---------- (www.addept.ws)
435.616.2322 ---------- (ammon AT addept.ws)
----- Original Message -----
From: "pat665" <[reboler--ifrance--com]>
To: <[rebol-list--rebol--com]>
Sent: Friday, December 27, 2002 11:24 AM
Subject: [REBOL] Artificial Life in Rebol ?
> Hi List,
> Is Rebol used in Articial Life?
<<quoted lines omitted: 5>>
> or can point me to a good place on internet to start with.
> Next year, my daughter is likely to study what is called
Bio-informatique
in french,
[3/28] from: steve:shireman:semaxwireless at: 27-Dec-2002 13:45
Pat,
Genetic Programming
by John Koza is an excellent read. Good treatise
of non-deductive logic (more inductive) for programmers. A-Life
community has GP section in most publications. John Koza took John
Holland's Genetic Algorithms a bit further...
Steve Shireman
pat665 wrote:
[4/28] from: carl:cybercraft at: 28-Dec-2002 8:38
Hi Patrick,
On 28-Dec-02, pat665 wrote:
> Hi List,
> Is Rebol used in Articial Life?
<<quoted lines omitted: 3>>
> I don't remind seing even a simple "Game Of Life" programmed in
> Rebol.
I think REBOL as a language would be good for programming such stuff -
it's just that View, VID & Draw would be slow for any graphic output.
Working directly with images might be the fastest way to go for the
visuals.
> I would be interesed if anyone know a "must have" book on
> that matter, or can point me to a good place on internet to start
> with.
I've read the first half of Steven Wolfram's "A New Kind of Science"
and that half's an interesting look at cellular automata, regardless
of what else the book's trying to say. (If you've not heard of it,
it's just a new theory of Life, the Universe and Everything.
Warning: It's a heavy, as in if you drop it on your foot kind of
book:)
> Next year, my daughter is likely to study what is called
> "Bio-informatique" in french, so I would like to have some ground
> knowledge...
Watch ants? (;
--
Carl Read
[5/28] from: greggirwin:mindspring at: 27-Dec-2002 14:48
Hi pat665,
p> Is Rebol used in Articial Life?
p> I don't remind seing even a simple "Game Of Life" programmed in Rebol.
p> I would be interesed if anyone know a "must have" book on that matter,
p> or can point me to a good place on internet to start with.
At the end of this message is a very simple, incomplete, first-whack
I did some time back at Conway's Game of Life. As far as books, I'm
not sure about "must have" titles, but I have a couple here I like:
'Creating Artificial Life' by Edward Rietman
'Artificial Life Lab' by Rudy Rucker
'Turtles, Termites, and Traffic Jams' by Mitchel Resnick
I have O'Reilly's 'Beginning Perl for Bioinformatics' by James
Tisdall, which I got with the intent of seeing how REBOL could be
applied, but haven't had any time to pursue it yet.
REBOL should be great for creating genetic algorithms because of its
dynamic nature and code/data duality. E.g. you could generate a
specification that included not only the executable code, but the
metadata that you could access reflectively for future mutation
generation, etc.
-- Gregg
REBOL [
Title: {Conway's Game of Life}
Author: "Gregg Irwin"
Email: [greggirwin--acm--org]
Version: 0.0.1
Date: 11-Mar-2002
Notes: {
Only side edges wrap. Top and bottom should as well.
It's very slow. I used images, rather than a separate
data structure, so there may be a lot of room to speed
things up. Larger images slow it down substantially.
Should add some standard patterns to load as seeds.
}
]
get-pix: func [img [image!] loc [pair!]] [
pick img 1 + ((loc/y - 1) * img/size/x) + ((loc/x - 1) // img/size/x)
]
set-pix: func [img [image!] loc [pair!] value [tuple!]] [
poke img 1 + ((loc/y - 1) * img/size/x) + ((loc/x - 1) // img/size/x) value
]
config: [
img-size 32x24 ; this is our data-set image
; (128x96 64x48 32x24 16x12)
view-size 256x192 ; how big is the viewer (256x192 512x384)
grid-size 0x0
]
config/grid-size: divide config/view-size config/img-size
neighbors: [-1x0 -1x-1 0x-1 1x-1 1x0 1x1 0x1 -1x1]
on-color: white
off-color: black
on-ct: 0
cell: 0x0
img: make image! config/img-size
alt-img: copy img
do-gen: func [img alt-img] [
repeat row img/size/y [
repeat col img/size/x [
cell: to-pair reduce [col row]
foreach offset neighbors [
if on-color = get-pix img cell + offset [on-ct: add on-ct 1]
]
either off-color = get-pix img cell [
set-pix alt-img cell either on-ct = 3 [on-color][off-color]
][
set-pix alt-img cell either any [on-ct = 2 on-ct = 3][on-color][off-color]
]
on-ct: 0
]
;world/effect: compose [
; fit grid (config/grid-size) emboss
; gradcol (random 255.255.255) (random 255.255.255) first random neighbors
; blur blur blur
;]
]
alt-img
]
view layout [
world: image img config/view-size effect compose/deep [fit grid (config/grid-size)] ;gradcol
(blue) (green)]
return
button "seed" [
random/seed now/precise
repeat i divide length? img 16 [
poke img random divide length? img 4 on-color
]
show world
]
button "go" [
forever [
world/image: do-gen img alt-img
tmp: img img: alt-img alt-img: tmp
show world
wait 0.05
;if equal? img alt-img [
; alert "Done!"
; break
;]
]
]
button "Quit" [quit]
]
[6/28] from: carl:cybercraft at: 28-Dec-2002 12:52
On 28-Dec-02, Gregg Irwin wrote:
> At the end of this message is a very simple, incomplete, first-whack
> I did some time back at Conway's Game of Life.
And which is prettier if you uncommemt the effects you can find in the
code! Though I found them a little more relaxing by having the
colors changed only when the seed button is hit instead of with every
update... (;
Nice work Gregg.
--
Carl Read
[7/28] from: chalz:earthlink at: 27-Dec-2002 20:29
> At the end of this message is a very simple, incomplete, first-whack
> I did some time back at Conway's Game of Life. As far as books, I'm
> not sure about "must have" titles, but I have a couple here I like:
So, uh, which version of REBOL is needed to run this? With /Link's console,
I get lots of missing [,] bracket errors, along with undefined 'button',
return or exit not in function
... lots.
Don't tell me, let me guess: This is one of those times where having the
ultralatest beta and all that is NOT good? :P
--Charles
[8/28] from: greggirwin:mindspring at: 27-Dec-2002 19:21
Hi Charles,
C> So, uh, which version of REBOL is needed to run this? With /Link's console,
C> I get lots of missing [,] bracket errors, along with undefined 'button',
C> "return or exit not in function" ... lots.
C> Don't tell me, let me guess: This is one of those times where having the
C> ultralatest beta and all that is NOT good? :P
Probably a line-wrap issue. I didn't format it for posting. Sorry
about that.
-- Gregg
[9/28] from: carl:cybercraft at: 28-Dec-2002 16:03
On 28-Dec-02, Charles wrote:
>> At the end of this message is a very simple, incomplete,
>> first-whack I did some time back at Conway's Game of Life. As far
<<quoted lines omitted: 5>>
> Don't tell me, let me guess: This is one of those times where
> having the ultralatest beta and all that is NOT good? :P
I saved the email, cut out text so only the code was left, and it
worked fine on non-beta Views. I've just tried cutting and pasting
it though, and get...
** Script Error: button has no value
** Near: button "Quit" [quit]
>> ]
** Syntax Error: Missing [ at end-of-block
** Near: (line 1) ]
So, if you cut and pasted it, that might be the problem.
--
Carl Read
[10/28] from: chalz:earthlink at: 27-Dec-2002 22:42
> ** Script Error: button has no value
> ** Near: button "Quit" [quit]
> >> ]
> ** Syntax Error: Missing [ at end-of-block
> ** Near: (line 1) ]
>
> So, if you cut and pasted it, that might be the problem.
Hmm... I was certain I'd cleaned it up. Maybe I missed something. *sigh*
Thanks.
[11/28] from: rebolek:seznam:cz at: 28-Dec-2002 9:17
pat665 wrote:
>Hi List,
>Is Rebol used in Articial Life?
<<quoted lines omitted: 6>>
>Next year, my daughter is likely to study what is called "Bio-informatique" in french,
>so I would like to have some ground knowledge...
Hello,
me and Oldes wrote some kind of cellular automat based on our own rules,
you can program your own 'cells', they can 'evolve' somehow, you can
have different 'species' of 'cells' - we've programmed 'growing grass',
'vegetarians' (they eat just grass) and one 'predator' (he's eating
other 'cells') but it was never released because of the following reasons:
1) small number of differenten 'species' - we have some 6-7 different
species, most of them are just vegetarians, only one 'predator' and not
very smart :)
2) there's no editor - we just made the engine, to change species or
world's config you have to change sourcecode
3) the GUI makes use of one of the Cyphre's VID-style (I was lazy to
program it by myself ;) but he wants to release them as shareware (well,
his opinion not mine :-(((( ) so I promised I never copy his styles to
anybody. I have to replace that VID-style first (it's tab) before I can
at least publish the unfinished version.
I wanted to make some snaphots but my monitor's broken so I run Windows
in 640x480 and I'm not able to run that script :) I'll make usable
version when I get some useful monitor, I promise :)
If anybody's interested feel free to contact me for more informations.
Bye, bolek
[12/28] from: sunandadh:aol at: 28-Dec-2002 4:01
Carl:
> I saved the email, cut out text so only the code was left, and it
> worked fine on non-beta Views. I've just tried cutting and pasting
> it though, and get...
I get the same result when cutting'n'pasting. But there is a way to cut'n'run:
do read clipboard://
Will transfer cut data into the console without up tripping over linewrap
issues,
It's a neat life simulator Gregg!
Sunanda.
[13/28] from: reboler:ifrance at: 28-Dec-2002 9:51
Hi List,
Thanks to all, I have collected some valuable informations:
- "Somewhere someone is working on genetical programming"
On the bibliography side, there's a lot:
- "Genetic Programming" by John Koza is an excellent read.
- Steven Wolfram's "A New Kind of Science"
- 'Creating Artificial Life' by Edward Rietman
- 'Artificial Life Lab' by Rudy Rucker
- 'Turtles, Termites, and Traffic Jams' by Mitchel Resnick
- O'Reilly's 'Beginning Perl for Bioinformatics' by James Tisdall
And finally Gregg provide me with a "Game of life'.
So far, so good. I'am surprised no answer came from french people,
as I supposed it was the kind of thing we (the french) are good at.
By the way, I'll be happy that someone correct me on my
so I would like to have some ground knowledge...
where "ground"
was supposed to mean "basic". Isn't it a word ending with "ground" with this meaning?
Regards
Patrick
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms
[14/28] from: reboler:ifrance at: 28-Dec-2002 10:01
Hi Bolek,
That's good news, except from the broken monitor.
Hope that it will be soon fixed and you will be able to release something (even with
poor or no graphics).
Regards
Patrick
[15/28] from: carl:cybercraft at: 28-Dec-2002 22:15
On 28-Dec-02, Boleslav Brezovsky wrote:
> I wanted to make some snaphots but my monitor's broken so I run
> Windows in 640x480 and I'm not able to run that script :) I'll make
> usable version when I get some useful monitor, I promise :)
Sounds like real life to me. (;
Those of you interested in artificial life and who aren't getting
enough emails should try out technosphere...
http://www.technosphere.org.uk/
There's a germ of a good idea there, but they don't give you enough
control over the creation of your original creature.
--
Carl Read
[16/28] from: carl:cybercraft at: 28-Dec-2002 22:48
On 28-Dec-02, [SunandaDH--aol--com] wrote:
> Carl:
>> I saved the email, cut out text so only the code was left, and it
<<quoted lines omitted: 5>>
> Will transfer cut data into the console without up tripping over
> linewrap issues,
Hmmm. Didn't work for me with YAM on Amiga...
>> do read clipboard://
** Syntax Error: Missing [ at end-of-block
** Near: (line 1) ]
Probably depends on your mailer and if it cuts or copies from the
original email or the line-wrapped version that's being displayed.
--
Carl Read
[17/28] from: carl:cybercraft at: 28-Dec-2002 23:30
On 28-Dec-02, pat665 wrote:
> By the way, I'll be happy that someone correct me on my "so I would
> like to have some ground knowledge..." where "ground" was supposed
> to mean "basic". Isn't it a word ending with "ground" with this
> meaning?
Hmm - my comments on the ants may have given you the idea your message
hadn't got through there. (I hope you weren't offended by that, as
no offence was intended. It was just a light-hearted comment on how
similar artificial life and insect life can be, some insects being
very robotic-like.)
like to have some ground knowledge
if read literally in English
could mean you want to have some knowledge about the ground or you'd
like to have the knowledge ground up. (It's common to have coffee
ground, but not knowledge, ground in this case being related to
grind, not the earth we're standing on.)
What you were after I think was that you'd "like to have a basic
/grounding/ in the subject" or perhaps you'd "like to have some
/background/ knowledge", though the later could suggest you want
knowledge that's related to the subject, but not specific to it.
Rest assured though that your meaning was clear and I was just being a
bit flippant.
--
Carl Read
[18/28] from: reboler:ifrance at: 28-Dec-2002 12:26
Hi Carl,
Thanks for the explanation and not offended at all !
I am glad to learn a bit of english and I think I was looking for "grounding".
In french, you could say "avoir des notions de base".
Regards
Patrick
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms
[19/28] from: steve:shireman:semaxwireless at: 28-Dec-2002 8:03
Ah, a must-have book which most certainly reveals the future.
Steve Shireman
Gregg Irwin wrote
[20/28] from: anton:lexicon at: 29-Dec-2002 15:08
Hi Bolek,
What does it do?
Maybe I can knock one together for you.
Describe how it should work and show an example
usage in a layout block.
Anton.
[21/28] from: rebolek::seznam::cz at: 2-Jan-2003 13:44
=?iso-8859-2?Q?BUNKAS=20=2D=20artificial=20life=20simulator?=
Hello,
sorry for delay, I was enjoying my short holiday, now I'm back.
So as I promised, I've uploaded BUNKAS - artificial life simulator by
me and Oldes. This is just some preview version - there's no world or
bunka editor, just some presets but you can at least check what it
can do.
It must be full of bugs - I know of at least two, one of them is
really hard to trace :-( and the second happens only when the program
is ran from web. I can't reproduce it in local enviroment (and that's
strange because on my computer I've got the same files as on FTP) -
these are the zeros in console when running the script.
Cyphre's style is removed so no more silly legal mumbo jumbo eulas
and other stupid copyright issues.
Enjoy it and please let me know how do you like it / what needs
improvement and so on...
And where you can find it? From desktop it's in sites/rebolek/bunkas
or direct from console do http://www.sweb.cz/rebolek/bunky-ignac.r
Bye,
bolek
______________________________________________________________________
Reklama:
P=F8edpla=BBte si Tarify nov=E9 generace na =B9est m=ECs=EDc=F9 a z=EDsk=E1te vol=E1n=ED
o v=EDkendu
v s=EDti Oskar zdarma. http://www.oskarmobil.cz/services/whatsnew.php
[22/28] from: rebol-list2:seznam:cz at: 3-Jan-2003 13:02
Re: Artificial Life in Rebol ?
Hello Anton,
Sunday, December 29, 2002, 5:08:16 AM, you wrote:
A> Hi Bolek,
A> What does it do?
A> Maybe I can knock one together for you.
A> Describe how it should work and show an example
A> usage in a layout block.
A> Anton.
>> 3) the GUI makes use of one of the Cyphre's VID-style (I was lazy to
>> program it by myself ;) but he wants to release them as shareware (well,
>> his opinion not mine :-(((( ) so I promised I never copy his styles to
>> anybody. I have to replace that VID-style first (it's tab) before I can
>> at least publish the unfinished version.
>> Bye, bolek
I think that Bolek is overstating it. The 3. issue was not the most
serious reason to me. Although the styles is problem very offen as we still
don't have some good library with possibility to make easy
installations (which will deal with different versions of script
parts).
I have many versions of this script and none of them is using tab
style (whicj is only in Bolek's version). I was not releasing it
just because there was czech sentences and some mess in the code.
I also wanted to make more inteligent cells but it would require
completely change the engine to make it fair (all cells should
have same ammount of actions that can do - simple dumb cell is
faster then cell which will make too many operations to look
around and so on).
Another reason was that in none of my versions there is
implemented cell properties inheritability (for example I want
know which value of patiance is the best to find some food around -
this would require some better reproduction, not just reproduction by
division)
=( Oliva David )=======================( [oliva--david--seznam--cz] )==
=( Earth/Europe/Czech_Republic/Brno )=============================
=( coords: [lat: 49.22 long: 16.67] )=============================
[23/28] from: rebolek:seznam:cz at: 4-Jan-2003 17:25
Hello Oldes,
well overstating...
it was just one of the reasons and really not the most important. It's
like two czech sequnces (there were only two of them). The GUI's
reworked now so I think it's closed chapter. But I want to say something
else.
You think that it's not fair that some cells are 'smarter' and can do
more 'actions' in one event. Look at real world. You have snails and
gepards, gepards are times faster than snails and is that fair? I think
yes. Some 'creatures' are more advanced than the others, people have
brains and they can do more things than both snails and gepards. And is
that fair?
I think that our simulation is not like Conway's life where no cells
really exist, they're just result of some basic rules and you can say
that it's not fair that some configuration can lead to big number of
cells (where did the cells get from? From - nothing???) Our cells are
individuals, they have their own rules like snails and gepards and people.
Yes, the code is messy and there is not very much different kinds of
cells. But there was discussion about artificial life on the ML so I
thought it's good idea to show the work already done. Yes, it needs
improvements but we both know that it's not number one on our priority
list ;) so why not to release it (you know, hard drives can crash so at
least it's archived somewhere ;)
have good time, oldes,
bye, bolek
RebOldes wrote:
[24/28] from: greggirwin:mindspring at: 4-Jan-2003 11:42
Boleslav, Oldes et al
I think it can be instructive to see how cells fare when they do more
work, versus those that do less. Another option is for a cell to
create "sub cells" and become a cluster, with each sub cell getting
its own time slice. For more complex entities, they would take more
time to create and can't multiply as fast.
OTOH, if you're creating a game, or competition, where people can
devise their own creatures to compete (CoreWars - and yes, Carl R. I
still think about Cat and Mouse :), then you need to consider fairness
and maybe time consumed counts against their score if you allow it.
-- Gregg
[25/28] from: carl:cybercraft at: 5-Jan-2003 11:22
Hi Boleslav and Oldes,
I'd looked at BUNKAS, but just hadn'd got around to commenting yet.
So...
It worked fine, except for some ghost-like cells (just their trails
visible), but I think this had been mentioned so I'm sure you know of
it. Oh, and it'd be nice if all the cell rules (if that's what you
call them) were loaded when you first run it, so we don't have to be
online when trying the second and third and so on.
One thought I had was that you could have a finite amount of energy in
the system, with the cells leaving something behind them as they use
it up which the "grass" (if that's what the green stuff is) uses to
grow and spread out again into the areas where it's been eaten. A
stable (or fluctuating) system might then evolve.
On 05-Jan-03, Boleslav Brezovsky wrote:
> Hello Oldes,
>But I want to say something else.
<<quoted lines omitted: 4>>
> people have brains and they can do more things than both snails and
> gepards. And is that fair?
But are gepards' cells any more efficient than snails' cells? Or are
their main differences just their DNA, resulting in them being
different animals? (And what /is/ a gepard, anyway?:)
> I think that our simulation is not like Conway's life where no cells
> really exist, they're just result of some basic rules and you can
> say that it's not fair that some configuration can lead to big
> number of cells (where did the cells get from? From - nothing???)
> Our cells are individuals, they have their own rules like snails and
> gepards and people.
You could use their energy level to make it "fair". Have what they
do, (move, eat, look, whatever), use a certain amount of energy, so
if they did a lot of such things in an iteration of the simulation,
they use up more energy than if they did just a little. And maybe
those with longer rules (equating to bigger brains) should use more
energy each iteration too. If a balance can be found this way, the
big and the small, the fast and the slow and the clever and the
stupid may be able to survive together.
I'm sure BUNKAS does some of this already, but a complete system is
the ideal, right?
--
Carl Read
[26/28] from: carl:cybercraft at: 5-Jan-2003 11:27
On 05-Jan-03, Gregg Irwin wrote:
> OTOH, if you're creating a game, or competition, where people can
> devise their own creatures to compete (CoreWars - and yes, Carl R. I
> still think about Cat and Mouse :),
Chuckle - I needed to be reminded of it. A very short attention span
in this creature... (:
(Off Topic: BTW Gregg, isn't about time we showed the list
request-font?)
--
Carl Read
[27/28] from: greggirwin:mindspring at: 4-Jan-2003 23:49
Hi Carl,
CR> (Off Topic: BTW Gregg, isn't about time we showed the list
CR> request-font?)
Yes! Good idea. I'm failing badly at multitasking lately. Do you want
to post it, since you did the majority of the work? (clever, eh, you
do the most work so I ask you to do more :)
-- Gregg
[28/28] from: carl:cybercraft at: 5-Jan-2003 21:16
On 05-Jan-03, Gregg Irwin wrote:
> Hi Carl,
>> (Off Topic: BTW Gregg, isn't about time we showed the list
>> request-font?)
> Yes! Good idea. I'm failing badly at multitasking lately. Do you
> want to post it, since you did the majority of the work? (clever,
> eh, you do the most work so I ask you to do more :)
I'd guess that figuring out the truetype fonts wasn't that easy. But
anyway, you're the expert on how to upload stuff to the REBOL
library, (since I've never done it - that is where we were going to
put them, wasn't it?), then mention where they are in a new thread
here and I'll add any comments I think are necessary and we'll see
what feedback it gets. Like is it useful and does anyone want to do
the scripts for the other 20+ platforms? (:
If where you upload them needs any comments, just tell people to read
the script headers - it's what I'd do. (;
--
Carl Read
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted