1. Neural networks

Greg P. Wrote:
<snip>
> Students and professors at some university are using a genetic algorithm
> to create a new, useful, programming language.  Then, the computer,
> using a neural network, would teach itself the language, and write an
> improved genetic algorithm, to create an improved language, and an
> improved neural net.

> Which is scary.

On the contrary, I think it's a wonderful thought !

This reminds me of when I was a child. I had this idea: If I could
jump a little bit up in the air, and then while still in the air, perform
another jump right away, I might be able to get higher and higher
up until finally I would fly !

As you can see, I was not a very bright child smile

I don't think the idea you mentioned would work, though, not in a
long while anyway. At any point, a human being would be able to
work out a much better improvement of the language algorithm than
the neural network in question. This of course due to the fact that
our own NNs are far more powerful than what can be made with
artificial means, and probably will be for another 50 years at least.

But then, that's just MHO, and I'm still not very bright, so you may
be right anyway... smile


BTW: A month ago I asked whether anyone on the list was
interested in, or was working with artificial neural networks,
but I got no feedback. I'm trying to make some general Euphoria
functions for a network with some kind of backpropagation in E.

I'd still like to know whether anyone else is doing the same
thing, or perhaps already has completed some functions.


Regards,

Tor Bernhard Gausen

new topic     » topic index » view message » categorize

2. Re: Neural networks

YES! I'm definitely interested! I've done only scant research into the =
subject though, and still don't quite understand the algorithms =
(although I do understand the concept.) If anyone has any information or =
work in the area, a posting to the list would be appreciated. smile

Hmmm, this reminds me; years back I toyed around with genetic =
algorithms. Has anyone done anything in Euphoria in this area? Perhaps =
I'll try to recall my primitive "gene program" and rewrite it in =
Euphoria. I think with the language's built-in simplicity (Lisp-like in =
many ways) there could be some fantastic potential here...


Rod Jackson


----------
From:   Tor Bernhard Gausen[SMTP:tor.gausen at C2I.NET]
Sent:   Thursday, February 18, 1999 5:09 AM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Neural networks

Greg P. Wrote:
<snip>
> Students and professors at some university are using a genetic =
algorithm
> to create a new, useful, programming language.  Then, the computer,
> using a neural network, would teach itself the language, and write an
> improved genetic algorithm, to create an improved language, and an
> improved neural net.

> Which is scary.

On the contrary, I think it's a wonderful thought !

[...]

BTW: A month ago I asked whether anyone on the list was
interested in, or was working with artificial neural networks,
but I got no feedback. I'm trying to make some general Euphoria
functions for a network with some kind of backpropagation in E.

I'd still like to know whether anyone else is doing the same
thing, or perhaps already has completed some functions.


Regards,

Tor Bernhard Gausen

new topic     » goto parent     » topic index » view message » categorize

3. Re: Neural networks

> YES! I'm definitely interested! I've done only scant research into the subject
> though, and still don't quite understand the algorithms (although I do understand
> the concept.) If anyone has any information or work in the area, a posting to the
> list would be appreciated. smile

I am also very interested in artificial intelligence. I don't know very much
about it yet, but I have a book on it and I would really like to create
artificially intelligent programs.

> Hmmm, this reminds me; years back I toyed around with genetic algorithms. Has
> anyone done anything in Euphoria in this area? Perhaps I'll try to recall my
> primitive "gene program" and rewrite it in Euphoria. I think with the language's
> built-in simplicity (Lisp-like in many ways) there could be some fantastic
> potential here...

Actually, I wrote a program in Euphoria to simulate natural selection in
peppered moths for my science fair project (which won 1st place in my grade). If
anyone is interrested, tell me and I'll rewrite it into a genetic library.

--
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

new topic     » goto parent     » topic index » view message » categorize

4. Re: Neural networks

Not only would I be interested, I might even contribute.

Perhaps the community could eventually write a collection of AI =
libraries for Euphoria? Now THAT would be nice! grin


Rod Jackson

----------
From:   Jeffrey Fielding[SMTP:JJProg at CYBERBURY.NET]
Sent:   Thursday, February 18, 1999 12:21 PM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Re: Neural networks

> YES! I'm definitely interested! I've done only scant research into the =
subject though, and still don't quite understand the algorithms =
(although I do understand the concept.) If anyone has any information or =
work in the area, a posting to the list would be appreciated. smile

I am also very interested in artificial intelligence. I don't know very =
much about it yet, but I have a book on it and I would really like to =
create artificially intelligent programs.

> Hmmm, this reminds me; years back I toyed around with genetic =
algorithms. Has anyone done anything in Euphoria in this area? Perhaps =
I'll try to recall my primitive "gene program" and rewrite it in =
Euphoria. I think with the language's built-in simplicity (Lisp-like in =
many ways) there could be some fantastic potential here...

Actually, I wrote a program in Euphoria to simulate natural selection in =
peppered moths for my science fair project (which won 1st place in my =
grade). If anyone is interrested, tell me and I'll rewrite it into a =
genetic library.

--
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

new topic     » goto parent     » topic index » view message » categorize

5. Re: Neural networks

Here is my first version of the genetics library. It is very simple, actually.
There are some bugs in it though, so if you could help figure them out, that
would be really great.

Also, I'll probably post my science fair research on my website sometime soon,
but I'm not sure when (I'm going to the state competition and I don't know
whether I should post my research until then... I'll ask my teachers when I get
back to school). Basically, I wrote a program to simulate natural selection in
Peppered Moths (there
was a famous study done in England about these, but I won't explain it all here.
You should be able to find it by searching the Internet).

-- Genetics library by Jeffrey Fielding (JJProg at cyberbury.net)
-- version 0.1 alpha
-- Allows programs to use genetic algorithms to adapt
-- Please send me your questions, comments, and suggestions
global constant GENES = 1, INVERSE_FITNESS = 2
global function evolve(sequence lifeforms, integer mutate, integer
inverseFitness, integer n)
    object k
    for i = 1 to length(lifeforms) do
lifeforms[i][INVERSE_FITNESS] =
         call_func(inverseFitness,{lifeforms[i]})
    end for
    for i = 1 to n do
         k = {}
         for j = 1 to length(lifeforms) do
             k = k & repeat(j,lifeforms[j][INVERSE_FITNESS])
         end for
         k = k[rand(length(k))]
lifeforms[k][GENES] =
         call_func(mutate,{lifeforms[rand(length(lifeforms))]})
lifeforms[k][INVERSE_FITNESS] =
         call_func(inverseFitness,{lifeforms[k]})
    end for
    return lifeforms
end function
-- All the rest of this code is a test. It creates a group of 1-gened things
with the gene ranging from 0 to 9.
-- They should adapt to 5.
sequence l
l = repeat(0,80)
for i = 1 to 80 do
    l[i] = {rand(10)-1,0}
end for
function m(sequence l)
    l[1] += rand(3)-2
    return l
end function
function inv(sequence l)
    if l[1] < 5 then
         return 5-l[1]
    else
         return l[1]-5
    end if
end function
while get_key() = -1 do
    l = evolve(l,routine_id("m"),routine_id("inv"),1)
    position(1,1)
    for i = 1 to 80 do
         printf(1,"%d",l[i][1])
    end for
end while

--
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

new topic     » goto parent     » topic index » view message » categorize

6. Re: Neural networks

There is some guy(i forgot his name) woking on making NN's with
hardware...he has taken 3 transitors and did more then someone with a
few billion...the resion a computer canot truly do NN's is that it is
based on nothing more then 1's and 0's ...NN's are not based that way
but on a sliding scale...I have looked in to this a little and plan to
some more..I have thought about making a emulator that used 32 bit
number to represent 0 to 1(on a volt scale) and then make it
loop/add/subtract but i dont know just how to do it...might be a good
projeact for some one with more time on the subject....

Grape
>Greg P. Wrote:
><snip>
>> Students and professors at some university are using a genetic
algorithm
>> to create a new, useful, programming language.  Then, the computer,
>> using a neural network, would teach itself the language, and write an
>> improved genetic algorithm, to create an improved language, and an
>> improved neural net.
>
>> Which is scary.
>
>On the contrary, I think it's a wonderful thought !
>
>This reminds me of when I was a child. I had this idea: If I could
>jump a little bit up in the air, and then while still in the air,
perform
>another jump right away, I might be able to get higher and higher
>up until finally I would fly !
>
>As you can see, I was not a very bright child smile
>
>I don't think the idea you mentioned would work, though, not in a
>long while anyway. At any point, a human being would be able to
>work out a much better improvement of the language algorithm than
>the neural network in question. This of course due to the fact that
>our own NNs are far more powerful than what can be made with
>artificial means, and probably will be for another 50 years at least.
>
>But then, that's just MHO, and I'm still not very bright, so you may
>be right anyway... smile
>
>
>BTW: A month ago I asked whether anyone on the list was
>interested in, or was working with artificial neural networks,
>but I got no feedback. I'm trying to make some general Euphoria
>functions for a network with some kind of backpropagation in E.
>
>I'd still like to know whether anyone else is doing the same
>thing, or perhaps already has completed some functions.
>
>
>Regards,
>
>Tor Bernhard Gausen


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

7. Re: Neural networks

At 07:09 AM 18-02-1999 , you wrote:

>This reminds me of when I was a child. I had this idea: If I could
>jump a little bit up in the air, and then while still in the air, perform
>another jump right away, I might be able to get higher and higher
>up until finally I would fly !

Wow! When I was child I frequently dreamt that I did that.


Regards,
        Daniel   Berstein
        daber at pair.com

new topic     » goto parent     » topic index » view message » categorize

8. Re: Neural networks

So did I, Up 20 feet and loose 10 feet before initiating another flap of
the arms. Then up another 20 feet. Pretty soon I was way up in the clouds
looking down. Then I would tip forward and glide and swoop and just enjoy
the ride. :) true.

-Somebody-

At 05:14 PM 2/18/99 -0400, you wrote:
>At 07:09 AM 18-02-1999 , you wrote:
>
>>This reminds me of when I was a child. I had this idea: If I could
>>jump a little bit up in the air, and then while still in the air, perform
>>another jump right away, I might be able to get higher and higher
>>up until finally I would fly !
>
>Wow! When I was child I frequently dreamt that I did that.
>
>
>Regards,
>        Daniel   Berstein
>        daber at pair.com
>
>

new topic     » goto parent     » topic index » view message » categorize

9. Re: Neural networks

Yes!!!

I've been doing a lot of reading on genetic algoritms, neural networks,
aLife, etc... over the past couple of months, as that's where my main
interest lies.

I was thinking today, about going home, and writing an email to the list
about NN, AI, and whatnot, and to see if anyone's interested.

I think Euphoria is well suited to this kind of thing, not so much as
say, Prolog, or Lisp, of course, but moreso than C\C++.

Just recently, I've done some experimentations in Eu simple AI, and some
*very* tentative steps into simple NN's.  As soon as I have anything
worthwhile, I'll post it, and I encourage others to do so as well, as
any of that can be used for any number of things (games, for fun,
scientific research, whatever).

Anyways, I'm glad someone got to the topic of AI, if only a few hours
before I would have =)

Greg

P.S~ Just a thought...wouldn't that make a neat kind of tutorial to help
a beginner learn Euphoria?  Perhaps just a simple little game, where
there are two pixels on the screen, one which you control, and another,
controlled by the computer, that uses very simple AI to react to your
movements?  I think that if a beginner were to spend a week with a
tutorial like that, and have a nice little program at the end, with the
ability to say: "Hey, I just learned some of the basics of artificial
intelligence, while learning a new language", Eu's popularity would gain
a little ground.

Even C had to start by gaining a little ground at a time =)

--
Greg Phillips
i.shoot at rednecks.com
http://euphoria.server101.com
--

Useless fact of the day:

The average person makes about 1,140 telephone calls each year

new topic     » goto parent     » topic index » view message » categorize

10. Re: Neural networks

Here is a simple natural selection program I made last week.
It's a text based display.
It shows the evolution of a group of organisms.
The organisms each have a string of dna. when 2 organisms reproduce
random pieces are selected from each parent to form the dna for the
offspring. dna values of {0,0} will produce weak statistics,
values of {1,0} or {0,1} will produce moderate statistics,
and {1,1} will produce high statistics. At birth the dna is used to
calculate the organisms beginning health and it's natural ability to
collect food. Each day the organisms will collect food from the food
source, which accumulates each day. The higher their ability to collect
food, the more food they will collect. If an organism doesn't collect
enough food to feed itself it will loose health. If there is not enough
food in the food source for all organisms, then the organisms will limit
how much food they will collect so that the colony has a better chance to
survive. organisms can only reproduce with organisms of the same
generation. There can only be 3 generations alive at one time. this is to
prevent over population.
Organisms highlighted purple have just mated.
Organisms highlighted red are dead.
Organisms highlighted green means that it's the last surviving of it's
generation and will lose 1 health per day due to old age, to make way for
new generations.

reproducing requires that both parents be above a certain age and uses
up some of the parents food. reproducing also causes the loss of some
health. The age and food requirement becomes higher as the generations
increase.

You will notice that even though the offspring are produced by random
combinations of their parents, higher generations will be born with
superrior stats than the begining organisms.

I hope I didn't miss anything out. If you have any comments or questions
just e-mail me.

---------------------------------------------------------
--Begin Code
--Dna.e
--Liquid-Nitrogen Software 1999
---------------------------------------------------------

include graphics.e
include machine.e

object junk

tick_rate(100)
integer ROWS
if text_rows(50) != 50 then
    puts(1,"Couldn't set 50 text rows, must use 25.\nPress any key.")
    while get_key() != -1 do end while
    while get_key() = -1 do end while
    ROWS = 20
else
    ROWS = 45
end if
cursor(NO_CURSOR)

integer max_age, number_dead, food, food_growth, days, dpy, als, total_org_days,
max_gen, min_gen
sequence max_age_tag
max_age = 0
max_age_tag = "    "
number_dead = 0
food = 2000
food_growth = 20
days = 0                        --days passed since start.
dpy = -1                        --deaths per year
als = 0                         --average lifespan
total_org_days = 0              --combined days lived total
max_gen = 1
min_gen = -1

sequence orgs, reproduced, old

orgs = {}
reproduced = {}
old = {}

--dna = {health,health,health,health, fcol,fcol,fcol}
--       (1)    (2)    (3)    (4)          (5)  (6)     (7)
--org = {age, health, food,  food_collect, dna, tag, generation}

--current dna structure:
    --      001..020 health
    --      021..060 food collection

constant vowels = "AEIOU"
function create_org(sequence dna, integer g)
sequence org
    g += 1
    org = {0,0,90 + (g*10),0,dna, rand({26,26,26,26})+'@', g}
    if g > max_gen then
 max_gen = g
 min_gen = g-2
    end if
    org[6][rand(4)] = vowels[rand(5)]
    for i = 1 to 20 do
 if compare(dna[i],{0,0})=0 then
     org[2] += 5
 elsif compare(dna[i],{1,1})=0 then
     org[2] += 20
 else
     org[2] += 10
 end if
    end for
    for i = 21 to 60 do
 if compare(dna[i],{0,0})=0 then
     org[4] += 0
 elsif compare(dna[i],{1,1})=0 then
     org[4] += 2
 else
     org[4] += 1
 end if
    end for
    if org[4] = 0 then
 org[4] = 1
    end if
    return org
end function

function mix_dna(sequence g1, sequence g2)
sequence g3
    g3 = g1
    for i = 1 to length(g1) do
 if rand(50) = 1 then
     g3[i][1] = rand(2)-1
 else
     if rand(2) = 1 then
  g3[i][1] = g1[i][1]
     else
  g3[i][1] = g2[i][1]
     end if
 end if
 if rand(50) = 1 then
     g3[i][2] = rand(2)-1
 else
     if rand(2) = 1 then
  g3[i][2] = g1[i][2]
     else
  g3[i][2] = g2[i][2]
     end if
 end if
    end for
    return g3
end function

procedure do_day()
sequence temp, new
integer food_limit, food_get, eater, rok
    days += 1
    food += rand((food_growth + max_gen)*15)
    if rand(20) = 1 then
 food += rand((food_growth + max_gen)*30)
    elsif rand(30) = 1 then
 food += rand((food_growth + max_gen) * 100)
    end if
    if rand(10) = 1 then
 food_growth += (rand(5)-3)
 if food_growth < 10 then
     food_growth = 10
 elsif food_growth > 30 then
     food_growth = 30
 end if
    end if

    temp = {}
    new = {}
    reproduced = {}
    old = {}
    for i = 1 to length(orgs) do
 orgs[i][1] += 1
 if orgs[i][2] > 0 then
     temp = append(temp,orgs[i])
 else
     if orgs[i][1] > max_age then
  max_age = orgs[i][1]
  max_age_tag = orgs[i][6]
     end if
     number_dead += 1
     total_org_days += orgs[i][1]
     food += orgs[i][1]
     food += orgs[i][3]
 end if
    end for
    orgs = temp

    if length(orgs) > 0 then
 food_limit = floor(food/length(orgs))+1
    end if

    for i = 1 to length(orgs) do
 --collect food
 food_get = rand(orgs[i][4])
 if food_get > food_limit then
     food_get = food_limit
 end if
 if food >= food_get then
     orgs[i][3] += food_get
     food -= food_get
 else
     orgs[i][3] += food
     food = 0
 end if
 --eat food
 eater = 10 + floor(max_gen/4)
 if eater > 60 then
     eater = 60
 end if
 orgs[i][3] -= rand(eater)
 if orgs[i][3] < 0 then
     orgs[i][2] += orgs[i][3]
     if orgs[i][2] < 0 then
  orgs[i][2] = 0
     end if
     if orgs[i][3] < 0 then
  orgs[i][3] = 0
     end if
 end if
 --old_age
 rok = 0
 for x = 1 to length(orgs) do
     if i != x then
  if orgs[x][7] <= orgs[i][7] then
      rok = 1
  end if
     end if
 end for
 if rok = 0 then
     orgs[i][2] -= 1
     old = append(old,orgs[i][6])
 end if

 --reproduce
if orgs[i][2] > 0 and orgs[i][1] > (orgs[i][7]*30)+20 and orgs[i][3] > 45 +
 (orgs[i][7]*5) then
     rok = 1
     for x = 1 to length(orgs) do
  if x != i then
      if orgs[x][7] <= min_gen then
   rok = 0
      end if
  end if
     end for

     if rok = 1 or orgs[i][7] <= min_gen then
     for x = 1 to length(orgs) do
  if x != i then
      if orgs[i][7] = orgs[x][7] then
if orgs[x][2] > 0 and orgs[x][1] > (orgs[x][7]*30)+20 and orgs[x][3] > 45 +
   (orgs[x][7]*5) then
       orgs[i][3] -= 45 + (orgs[i][7]*5)
       orgs[x][3] -= 45 + (orgs[x][7]*5)
       orgs[i][2] -= (rand(10)+10)
       orgs[x][2] -= (rand(10)+10)
       reproduced = append(reproduced, orgs[i][6])
       reproduced = append(reproduced, orgs[x][6])
       new = append(new, create_org(mix_dna(orgs[i][5],orgs[x][5]), orgs[i][7]))
       exit
   end if
      end if
  end if
     end for
     end if
     if orgs[i][2] < 0 then
  orgs[i][2] = 0
     end if
     if orgs[i][3] < 0 then
  orgs[i][3] = 0
     end if
 end if
    end for
    for i = 1 to length(new) do
 orgs = append(orgs,new[i])
    end for

end procedure

for i = 1 to 15 do
    junk = rand(repeat({2,2},60))-1
    for x = 1 to length(junk) do
 junk[x][1] = junk[x][1] * (junk[x][2] = 0)
    end for
    for x = 1 to 80 do
 junk[rand(60)][rand(2)] = 0
    end for
    --? junk
    orgs = append(orgs, create_org(junk, 0))
end for

--integer max_age, number_dead, food, food_growth, days
--sequence max_age_tag
--org = {age, health, food, food_collect, dna, tag, generation}

integer disp_wait, wait_max
disp_wait = 1
wait_max = 1

integer key, max_disp
atom tim
key = -1
while 1 do
    tim = time()
    key = get_key()

    if key = 27 and length(orgs) = 0 then
 exit
    end if
    if key = 27 then
 orgs = {}
    end if

    do_day()

    disp_wait += 1
    if disp_wait > wait_max then
 disp_wait = 1
    position(1,1)
    mem_set(#B8000,0,160)
    text_color(7)
printf(1,"Days:%6d, Food:%5d, Food-Growth:%3d,
    Years:%4d.\n",{days,food,food_growth*15,floor(days/356)})
printf(1,"Most-Days-Lived: %s:%6d, Number-Dead:%5d.
    Number-Of-Generations:%d.",{max_age_tag,max_age,number_dead,max_gen})
    puts(1,"\n\n")
    --printf(1,"\n%d  \n",min_gen)

    max_disp = length(orgs)
    if max_disp > ROWS then
 max_disp = ROWS
    end if

    --org = {age, health, food, food_value, food_collect, dna, tag, generation}
    for i = 1 to 47 do
 mem_set(#B8000 + (i+2)*160, 0, 160)
 if i <= max_disp then
     if find(orgs[i][6],reproduced) then
  text_color(5)
     elsif orgs[i][2] = 0 then
  text_color(4)
     elsif find(orgs[i][6],old) then
  text_color(2)
     else
  text_color(7)
     end if
printf(1,"Gen:%3d Name:%s. Age:%5d. Health:%3d. Food:%5d,
     Food-Find:%2d.\n",{orgs[i][7],orgs[i][6],orgs[i][1],orgs[i][2],orgs[i][3],orgs[i][4]})
 end if
    end for
    if length(orgs) = 0 then
 puts(1,"All Organisms Have Died.\n")
 if dpy = -1 then
     dpy = floor(number_dead / (days/365))
     if number_dead = 0 then
  als = 0
     else
  als = floor(total_org_days / number_dead)
     end if
 end if
 if dpy > -1 then
     printf(1,"Average-Deaths-Per-Year:%4d.\n",dpy)
     printf(1,"Average-Life-Span:%6d days.\n",als)
 end if
    end if
    end if

--Comment these next 2 lines out so you can see what happens over a longer
    period of time.
    while time() - tim < .3 do  --Waiting...
    end while
end while

------------
--End Code--
------------

new topic     » goto parent     » topic index » view message » categorize

11. Re: Neural networks

Sounds like guys were in a state of euphoria when

you were young and flying.

Bernie :)

new topic     » goto parent     » topic index » view message » categorize

12. Re: Neural networks

Doing AI with Eu sounds like fun. In fact, I tried doing some rudimentary AI
stuff with the old 3D Tic-Tac-Toe game -- getting the computer to "learn"
from its previous moves -- but I never got anywhere with it, as I don't
really know a whole lot about AI. Besides, I don't need to make TTT.EX any
smarter -- it already beats the pants off me without any trouble! I just
wanted the satisfaction of creating my *own* routines that would wipe the
floor with the existing TTT.EX routines. >smile

I'm interested in learning more about AI. If anyone knows about it -- and
can explain it to someone else who doesn't really know much about it :) --
either e-mail me privately, or maybe e-mail the list, as it seems like there
are quite a few people here interested in this AI stuff.

Thanks,
Gabriel Boehme

new topic     » goto parent     » topic index » view message » categorize

13. Re: Neural networks

You do not say, but seem to suggest, that there is in life a law of
evolution that allows random combinations to produce superior organisms. I
do not see this program as proof of that. The variables that are
minipulated in this program are obviously geared toward success. Random is
random. It leads to nothing more than randomness. A true scientist would
tell you that there is no proof for evolution. There has never been
transitional forms of species found. A true scientist would tell you that
is takes more faith to believe in evolution that to believe we were created
by God.
We were, you know!
I compliment you on coding this program. It seems to run good.

Next?

-Somebody-


At 06:38 PM 2/18/99 -0500, you wrote:
>Here is a simple natural selection program I made last week.
>It's a text based display.
>It shows the evolution of a group of organisms.
>The organisms each have a string of dna. when 2 organisms reproduce
>random pieces are selected from each parent to form the dna for the
>offspring. dna values of {0,0} will produce weak statistics,
>values of {1,0} or {0,1} will produce moderate statistics,
>and {1,1} will produce high statistics. At birth the dna is used to
>calculate the organisms beginning health and it's natural ability to
>collect food. Each day the organisms will collect food from the food
>source, which accumulates each day. The higher their ability to collect
>food, the more food they will collect. If an organism doesn't collect
>enough food to feed itself it will loose health. If there is not enough
>food in the food source for all organisms, then the organisms will limit
>how much food they will collect so that the colony has a better chance to
>survive. organisms can only reproduce with organisms of the same
>generation. There can only be 3 generations alive at one time. this is to
>prevent over population.
>Organisms highlighted purple have just mated.
>Organisms highlighted red are dead.
>Organisms highlighted green means that it's the last surviving of it's
>generation and will lose 1 health per day due to old age, to make way for
>new generations.
>
>reproducing requires that both parents be above a certain age and uses
>up some of the parents food. reproducing also causes the loss of some
>health. The age and food requirement becomes higher as the generations
>increase.
>
>You will notice that even though the offspring are produced by random
>combinations of their parents, higher generations will be born with
>superrior stats than the begining organisms.
>
>I hope I didn't miss anything out. If you have any comments or questions
>just e-mail me.
>
>---------------------------------------------------------
>--Begin Code
>--Dna.e
>--Liquid-Nitrogen Software 1999
>---------------------------------------------------------
>
>include graphics.e
>include machine.e
>
>object junk
>
>tick_rate(100)
>integer ROWS
>if text_rows(50) != 50 then
>    puts(1,"Couldn't set 50 text rows, must use 25.\nPress any key.")
>    while get_key() != -1 do end while
>    while get_key() = -1 do end while
>    ROWS = 20
>else
>    ROWS = 45
>end if
>cursor(NO_CURSOR)
>
>integer max_age, number_dead, food, food_growth, days, dpy, als,
total_org_days, max_gen, min_gen
>sequence max_age_tag
>max_age = 0
>max_age_tag = "    "
>number_dead = 0
>food = 2000
>food_growth = 20
>days = 0                        --days passed since start.
>dpy = -1                        --deaths per year
>als = 0                         --average lifespan
>total_org_days = 0              --combined days lived total
>max_gen = 1
>min_gen = -1
>
>sequence orgs, reproduced, old
>
>orgs = {}
>reproduced = {}
>old = {}
>
>--dna = {health,health,health,health, fcol,fcol,fcol}
>--       (1)    (2)    (3)    (4)          (5)  (6)     (7)
>--org = {age, health, food,  food_collect, dna, tag, generation}
>
>--current dna structure:
>    --      001..020 health
>    --      021..060 food collection
>
>constant vowels = "AEIOU"
>function create_org(sequence dna, integer g)
>sequence org
>    g += 1
>    org = {0,0,90 + (g*10),0,dna, rand({26,26,26,26})+'@', g}
>    if g > max_gen then
> max_gen = g
> min_gen = g-2
>    end if
>    org[6][rand(4)] = vowels[rand(5)]
>    for i = 1 to 20 do
> if compare(dna[i],{0,0})=0 then
>     org[2] += 5
> elsif compare(dna[i],{1,1})=0 then
>     org[2] += 20
> else
>     org[2] += 10
> end if
>    end for
>    for i = 21 to 60 do
> if compare(dna[i],{0,0})=0 then
>     org[4] += 0
> elsif compare(dna[i],{1,1})=0 then
>     org[4] += 2
> else
>     org[4] += 1
> end if
>    end for
>    if org[4] = 0 then
> org[4] = 1
>    end if
>    return org
>end function
>
>function mix_dna(sequence g1, sequence g2)
>sequence g3
>    g3 = g1
>    for i = 1 to length(g1) do
> if rand(50) = 1 then
>     g3[i][1] = rand(2)-1
> else
>     if rand(2) = 1 then
>  g3[i][1] = g1[i][1]
>     else
>  g3[i][1] = g2[i][1]
>     end if
> end if
> if rand(50) = 1 then
>     g3[i][2] = rand(2)-1
> else
>     if rand(2) = 1 then
>  g3[i][2] = g1[i][2]
>     else
>  g3[i][2] = g2[i][2]
>     end if
> end if
>    end for
>    return g3
>end function
>
>procedure do_day()
>sequence temp, new
>integer food_limit, food_get, eater, rok
>    days += 1
>    food += rand((food_growth + max_gen)*15)
>    if rand(20) = 1 then
> food += rand((food_growth + max_gen)*30)
>    elsif rand(30) = 1 then
> food += rand((food_growth + max_gen) * 100)
>    end if
>    if rand(10) = 1 then
> food_growth += (rand(5)-3)
> if food_growth < 10 then
>     food_growth = 10
> elsif food_growth > 30 then
>     food_growth = 30
> end if
>    end if
>
>    temp = {}
>    new = {}
>    reproduced = {}
>    old = {}
>    for i = 1 to length(orgs) do
> orgs[i][1] += 1
> if orgs[i][2] > 0 then
>     temp = append(temp,orgs[i])
> else
>     if orgs[i][1] > max_age then
>  max_age = orgs[i][1]
>  max_age_tag = orgs[i][6]
>     end if
>     number_dead += 1
>     total_org_days += orgs[i][1]
>     food += orgs[i][1]
>     food += orgs[i][3]
> end if
>    end for
>    orgs = temp
>
>    if length(orgs) > 0 then
> food_limit = floor(food/length(orgs))+1
>    end if
>
>    for i = 1 to length(orgs) do
> --collect food
> food_get = rand(orgs[i][4])
> if food_get > food_limit then
>     food_get = food_limit
> end if
> if food >= food_get then
>     orgs[i][3] += food_get
>     food -= food_get
> else
>     orgs[i][3] += food
>     food = 0
> end if
> --eat food
> eater = 10 + floor(max_gen/4)
> if eater > 60 then
>     eater = 60
> end if
> orgs[i][3] -= rand(eater)
> if orgs[i][3] < 0 then
>     orgs[i][2] += orgs[i][3]
>     if orgs[i][2] < 0 then
>  orgs[i][2] = 0
>     end if
>     if orgs[i][3] < 0 then
>  orgs[i][3] = 0
>     end if
> end if
> --old_age
> rok = 0
> for x = 1 to length(orgs) do
>     if i != x then
>  if orgs[x][7] <= orgs[i][7] then
>      rok = 1
>  end if
>     end if
> end for
> if rok = 0 then
>     orgs[i][2] -= 1
>     old = append(old,orgs[i][6])
> end if
>
> --reproduce
> if orgs[i][2] > 0 and orgs[i][1] > (orgs[i][7]*30)+20 and orgs[i][3] > 45
+ (orgs[i][7]*5) then
>     rok = 1
>     for x = 1 to length(orgs) do
>  if x != i then
>      if orgs[x][7] <= min_gen then
>   rok = 0
>      end if
>  end if
>     end for
>
>     if rok = 1 or orgs[i][7] <= min_gen then
>     for x = 1 to length(orgs) do
>  if x != i then
>      if orgs[i][7] = orgs[x][7] then
>   if orgs[x][2] > 0 and orgs[x][1] > (orgs[x][7]*30)+20 and orgs[x][3] >
45 + (orgs[x][7]*5) then
>       orgs[i][3] -= 45 + (orgs[i][7]*5)
>       orgs[x][3] -= 45 + (orgs[x][7]*5)
>       orgs[i][2] -= (rand(10)+10)
>       orgs[x][2] -= (rand(10)+10)
>       reproduced = append(reproduced, orgs[i][6])
>       reproduced = append(reproduced, orgs[x][6])
>       new = append(new, create_org(mix_dna(orgs[i][5],orgs[x][5]),
orgs[i][7]))
>       exit
>   end if
>      end if
>  end if
>     end for
>     end if
>     if orgs[i][2] < 0 then
>  orgs[i][2] = 0
>     end if
>     if orgs[i][3] < 0 then
>  orgs[i][3] = 0
>     end if
> end if
>    end for
>    for i = 1 to length(new) do
> orgs = append(orgs,new[i])
>    end for
>
>end procedure
>
>for i = 1 to 15 do
>    junk = rand(repeat({2,2},60))-1
>    for x = 1 to length(junk) do
> junk[x][1] = junk[x][1] * (junk[x][2] = 0)
>    end for
>    for x = 1 to 80 do
> junk[rand(60)][rand(2)] = 0
>    end for
>    --? junk
>    orgs = append(orgs, create_org(junk, 0))
>end for
>
>--integer max_age, number_dead, food, food_growth, days
>--sequence max_age_tag
>--org = {age, health, food, food_collect, dna, tag, generation}
>
>integer disp_wait, wait_max
>disp_wait = 1
>wait_max = 1
>
>integer key, max_disp
>atom tim
>key = -1
>while 1 do
>    tim = time()
>    key = get_key()
>
>    if key = 27 and length(orgs) = 0 then
> exit
>    end if
>    if key = 27 then
> orgs = {}
>    end if
>
>    do_day()
>
>    disp_wait += 1
>    if disp_wait > wait_max then
> disp_wait = 1
>    position(1,1)
>    mem_set(#B8000,0,160)
>    text_color(7)
>    printf(1,"Days:%6d, Food:%5d, Food-Growth:%3d,
>    printf(1,"Most-Days-Lived: %s:%6d, Number-Dead:%5d.
>    puts(1,"\n\n")
>    --printf(1,"\n%d  \n",min_gen)
>
>    max_disp = length(orgs)
>    if max_disp > ROWS then
> max_disp = ROWS
>    end if
>
>    --org = {age, health, food, food_value, food_collect, dna, tag,
generation}
>    for i = 1 to 47 do
> mem_set(#B8000 + (i+2)*160, 0, 160)
> if i <= max_disp then
>     if find(orgs[i][6],reproduced) then
>  text_color(5)
>     elsif orgs[i][2] = 0 then
>  text_color(4)
>     elsif find(orgs[i][6],old) then
>  text_color(2)
>     else
>  text_color(7)
>     end if
>     printf(1,"Gen:%3d Name:%s. Age:%5d. Health:%3d. Food:%5d,
gs[i][4]})
> end if
>    end for
>    if length(orgs) = 0 then
> puts(1,"All Organisms Have Died.\n")
> if dpy = -1 then
>     dpy = floor(number_dead / (days/365))
>     if number_dead = 0 then
>  als = 0
>     else
>  als = floor(total_org_days / number_dead)
>     end if
> end if
> if dpy > -1 then
>     printf(1,"Average-Deaths-Per-Year:%4d.\n",dpy)
>     printf(1,"Average-Life-Span:%6d days.\n",als)
> end if
>    end if
>    end if
>
>    --Comment these next 2 lines out so you can see what happens over a
longer period of time.
>    while time() - tim < .3 do  --Waiting...
>    end while
>end while
>
>------------
>--End Code--
>------------
>
>

new topic     » goto parent     » topic index » view message » categorize

14. Re: Neural networks

The organisms are not totaly random, they are generated by a random
combination of their parents. The organisms which have better stats
tend to survive longest and therefore have a better chance of reproducing
where as the weak ones die early in life and don't have the chance to
spread their dna. natural selection i guess, survival of the fittest.
-Mark.



>You do not say, but seem to suggest, that there is in life a law of
>evolution that allows random combinations to produce superior organisms. I
>do not see this program as proof of that. The variables that are
>minipulated in this program are obviously geared toward success. Random is
>random. It leads to nothing more than randomness. A true scientist would
>tell you that there is no proof for evolution. There has never been
>transitional forms of species found. A true scientist would tell you that
>is takes more faith to believe in evolution that to believe we were created
>by God.
>We were, you know!
>I compliment you on coding this program. It seems to run good.

>Next?

new topic     » goto parent     » topic index » view message » categorize

15. Re: Neural networks

------=_NextPart_000_005B_01BE5B97.FEDF7800
        charset="iso-8859-1"

>A true scientist would tell you that is takes more faith to believe in
>evolution that to believe we were created by God.
>We were, you know!
>I compliment you on coding this program. It seems to run good.
>
>Next?
>
>-Somebody-


Excuse me, but this is an uninspired and unrelated comment that doesn't
belong on the server, as an agnostic I am offended that you would post this
to a list on such a theologically neutral topic.  You shoud be ashamed of
yourself for stating your opinion of religion as proven fact.

Sincerely,
Adam Weeden
WeedenSoft Technologies

------=_NextPart_000_005B_01BE5B97.FEDF7800
        name="Adam W Weeden.vcf"

new topic     » goto parent     » topic index » view message » categorize

16. Re: Neural networks

>>A true scientist would tell you that is takes more faith to believe in
>>evolution that to believe we were created by God.
>>We were, you know!
>>I compliment you on coding this program. It seems to run good.
>>
>>Next?
>>
>>-Somebody-
>
>
>Excuse me, but this is an uninspired and unrelated comment that doesn't
>belong on the server, as an agnostic I am offended that you would post
this
>to a list on such a theologically neutral topic.  You shoud be ashamed
of
>yourself for stating your opinion of religion as proven fact.
>
>Sincerely,
>Adam Weeden
>WeedenSoft Technologies
>
I agree...I probly done it to...

Grape

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

new topic     » goto parent     » topic index » view message » categorize

17. Re: Neural networks

>You do not say, but seem to suggest, that there is in life a law of
>evolution that allows random combinations to produce superior organisms. I
>do not see this program as proof of that. The variables that are
>minipulated in this program are obviously geared toward success. Random is
>random. It leads to nothing more than randomness. A true scientist would
>tell you that there is no proof for evolution. There has never been
>transitional forms of species found. A true scientist would tell you that
>is takes more faith to believe in evolution that to believe we were created
>by God.
>We were, you know!


*puke* *puke* you sound like a commercial for cleaning-stuff.
And as to this is a rational list, there are only two things we can rationally
conclude:
- religious opinions are IRRELEVANT to this discussion.
- any person claiming to know wether (a/the) God DOES or DOES NOT exists is
pretentieus, speculative and problely
self-manipulative.

A qoute I found somewhere: (some quoutes site, I can lookup the url if anyone
wants it, its a pretty funny site)
" Trust those who seek the truth. Doubt those who claim to have found it "

Ralf

new topic     » goto parent     » topic index » view message » categorize

18. Re: Neural networks

"It matters not how many times a man may say "It is not". If it is, it is.

-Somebody-

At 11:39 PM 2/18/99 -0500, you wrote:
>>A true scientist would tell you that is takes more faith to believe in
>>evolution that to believe we were created by God.
>>We were, you know!
>>I compliment you on coding this program. It seems to run good.
>>
>>Next?
>>
>>-Somebody-
>
>
>Excuse me, but this is an uninspired and unrelated comment that doesn't
>belong on the server, as an agnostic I am offended that you would post this
>to a list on such a theologically neutral topic.  You shoud be ashamed of
>yourself for stating your opinion of religion as proven fact.
>
>Sincerely,
>Adam Weeden
>WeedenSoft Technologies
>
>Attachment Converted: "e:\zipdrive\2handmade\eudora\eudora\attach\Adam W
Weeden4.vcf"
>

new topic     » goto parent     » topic index » view message » categorize

19. Re: Neural networks

Gentlemen...

Is there some reason this hasn't progressed to private emails yet?

Rod Jackson


----------
From:   MilesDaniel[SMTP:handmade at CITILINK.COM]
Sent:   Friday, February 19, 1999 5:50 PM
To:     EUPHORIA at LISTSERV.MUOHIO.EDU
Subject:        Re: Neural networks

"It matters not how many times a man may say "It is not". If it is, it is.

-Somebody-

At 11:39 PM 2/18/99 -0500, you wrote:
>>A true scientist would tell you that is takes more faith to believe in
>>evolution that to believe we were created by God.
>>We were, you know!
>>I compliment you on coding this program. It seems to run good.
>>
>>Next?
>>
>>-Somebody-
>
>
>Excuse me, but this is an uninspired and unrelated comment that doesn't
>belong on the server, as an agnostic I am offended that you would post this
>to a list on such a theologically neutral topic.  You shoud be ashamed of
>yourself for stating your opinion of religion as proven fact.
>
>Sincerely,
>Adam Weeden
>WeedenSoft Technologies
>
>Attachment Converted: "e:\zipdrive\2handmade\eudora\eudora\attach\Adam W
Weeden4.vcf"
>

new topic     » goto parent     » topic index » view message » categorize

20. Re: Neural networks

>Gentlemen...
>
>Is there some reason this hasn't progressed to private emails yet?
>
>Rod Jackson

It has and has been settled outside of the list.

Adam Weeden
WeedenSoft Technologies

new topic     » goto parent     » topic index » view message » categorize

21. Re: Neural networks

------=_NextPart_000_002A_01BE5C63.173C5460
        charset="iso-8859-1"

>"It matters not how many times a man may say "It is not". If it is, it is.
>
>-Somebody-


And in turn It matters not how many times a man may say "It is.". If it is
not, it is not.

Adam Weeden
WeedenSoft Technologies


------=_NextPart_000_002A_01BE5C63.173C5460
        name="Adam W Weeden.vcf"

new topic     » goto parent     » topic index » view message » categorize

22. Re: Neural networks

I just came across this link with shareware Neural network progs.

http://www.industry.net/c/mn/_swnet

MilesDaniel

new topic     » goto parent     » topic index » view message » categorize

23. Re: Neural networks

Adam Weeden wrote:

> >A true scientist would tell you that is takes more faith to believe in
> >evolution that to believe we were created by God.
> >We were, you know!
> >I compliment you on coding this program. It seems to run good.
> >
> >Next?
> >
> >-Somebody-
>
> Excuse me, but this is an uninspired and unrelated comment that doesn't
> belong on the server, as an agnostic I am offended that you would post this
> to a list on such a theologically neutral topic.  You shoud be ashamed of
> yourself for stating your opinion of religion as proven fact.
>
> Sincerely,
> Adam Weeden
> WeedenSoft Technologies
>
>   ------------------------------------------------------------------------
>
>   Adam W Weeden <theskaman at mindspring.com>
>   President
>   WeedenSoft Technologies
>
>   Adam W Weeden
>   President                <theskaman at mindspring.com>
>   WeedenSoft Technologies
>   Tampa
>   FL
>   Additional Information:
>   Version        2.1
>   Last Name      Weeden
>   First Name     Adam
>   Additional NameW
>   Label Work     Tampa, FL
>   Revision       19990219T043955Z

 I agree with "Somebody". I am Christian, but even if you are not, don't judge!

new topic     » goto parent     » topic index » view message » categorize

24. Re: Neural networks

Sorry about jumping back so far, but this thread *has* recently been
referenced, and this quote has really been bugging me lately:

Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> wrote:
>" Trust those who seek the truth. Doubt those who claim to have found it "

How will we ever know if the truth is found? If anyone ever actually *does*
find it, should they just sit around, smugly keeping it to themselves?
What's the point in seeking it if you're not supposed to actually find it?

Why should we doubt anyone who has actually come to a particular conclusion,
yet trust those who are incapable of making up their minds?


Gabriel Boehme

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu