[Icfp04-discuss] Ambiants Evolution

Dmitri Kondratiev d_kondr at yahoo.com
Tue Jun 8 09:08:19 EDT 2004


Ambiants task was a great idea for the contest. I had
so much fun implementing Ambiants simulator in
NetLogo. Alas, I had not managed to complete it in
time. Currently it can be used only to:

1) Dispaly worlds loaded from worlds description files
in ASCII format (as specified by Contest rules)
2) Load and parse ant FSM code from files in ASCII
format (as specified by Contest rules)
3) Trace run of FSM code with simulated random state
generation without actually applying it on ants
(simulation of simulation mode J

I plan to continue work on simulator to research
ambiants more. It would be interesting to find the
best ant minds in the current ant architecture. I will
put my simulator on web when it finally works.

It seems most natural to continue ant context, an idea
that I hope others would also like, there are so many
interesting ambient things yet to play with!
I suggest extending ant mind a little bit so ambiants
could learn and evolve and make their collaborative
life more interesting. 

*** Statefull Ambients ***

As a first step I would add a tiny memory to an ant
mind, let’s say 10 memory locations. This would allow
an ant to pursue more interesting strategies. With
added memory the instruction set could be as follows: 

Sense mem[k] mem[t] mem[f] ; Go to state taken from
mem[t] if condition (taken from memory location with
address = k) holds; and to state taken from mem[f] 
otherwise.  Variations of addressing modes:
Sense cond mem[t] mem[f] ;
Sense cond mem[t] st2 ;

Mark mem[n] st; Set mark from memory location with
address = n in current cell and go to st.

Unmark mem[n] st; Clear mark  in current cell that
equals to the value of memory location with address =
n and go to st.

PickUp mem[k] mem[n] ; Pick up food from current cell
and go to state 1 from mem[k]; go to state 2 from
mem[n]if there is no food in the current cell. Here k,
n are memory addresses. This command can mix state
addressing modes as well, such as :
PickUp st1 mem[n]
PickUp mem[k] st2

Drop mem[n] ; Drop food in current cell and go to
state from memory location with address = n

Turn lr mem[n] Turn left or right and go to state from
memory location with address = n


Move mem[k] mem[n] ; Move forward and go to state 1
from mem[k]; go to state 2 from mem[n] if the cell
ahead is blocked. Here k, n are memory addresses. This
command can mix state addressing modes as well, such
as :
Move st1 mem[n]
Move mem[k] st2

Flip mem[p] mem[k] mem[n] ; Choose a random number x
from 0 to mem[p] -1; go to state 1 from mem[k] if x=0
and state 2 from mem[n] otherwise. Here k, n are
memory addresses. This command can mix state
addressing modes as well, such as :
Flip p mem[k] mem[n]
Flip p st1 mem[n]
Etc …

New command:

Add op1 op2 sum ; Add two operands (op1 and op2) and
put them in memory location ‘sum’. Operands can be
specified as memory locations (mem[k] mem[n]) or in
immediate mode, such as: “Sum 1 mem[k] mem[s]”


*** Reprogramming Ambiants ***

Next, I would allow ants to reprogram themselves. This
can be done by providing access to instruction memory.
Ant should be able:

1) read instructions from instruction memory to its
tiny memory
2) write instruction codes and operands to instruction
memory

For example:
WriteCode 100 Move mem[k] mem[n] ; write new command
(move) to instruction (state) 100 

WriteCode 13 Flip p mem[k] mem[n] ; mixed addressing,
change state 13

WriteCode 77 mem[c] mem[k] mem[n] ; instruction code
is in mem[c]


That’s all for now, just an illustration where ambient
things can go from here :)
Also it would interesting to know if “ongoing Ambiants
Evolution” contest could be organized at all?

Best of luck,
Dima





=====
Dmitri Kondratiev,
d_kondr at yahoo.com
http://www.geocities.com/dkondr/

Principal Architect
R&D LUXOFT
IBS group of companies
dkondratiev at luxoft.com
http://www.luxoft.com


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


More information about the Icfp04-discuss mailing list