swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] specifying Agent creation/actions through a .scm fil


From: Paul Johnson
Subject: Re: [Swarm-Support] specifying Agent creation/actions through a .scm file
Date: Mon, 11 Oct 2004 10:00:10 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922

In Objective-C, I've used .scm files to introduce all kinds of info in a simulation. I recently was reworking the Arborgames model and introduced .scm files to store various values, maybe these will give you a hint. I'm not doing this in Java, but doubt that the issue is grossly different.

http://lark.cc.ku.edu/~pauljohn/Swarm/MySwarmCode/arborgamesII-1.1-Swarm-2.2.tar.gz

I've done "serialization" with .scm files in other projects. You can have agents save their state to files, and then you can restart the entire simulation at that point. I think I only have 2 more-or-less completely functional examples like that:

http://lark.cc.ku.edu/~pauljohn/Swarm/MySwarmCode/OpinionFormation/Opinion-2.0.1.tar.gz
(That's the model described in Huckfeldt, Johnson, and Sprague, Political Disagreement, Cambridge University Press, 2004)

http://ArtStkMkt.sourceforge.net
The most recent version, ASM-2.4, implements serialization in .scm files.

As far as I know, we now can save Swarm lists and Arrays, either shallow or deep, and there are also special methods to save C arrays of doubles or ints (Opinion model demonstrates)

Mervin Chan wrote:
Hi everyone,

I am using Java Swarm and I just want to know, is there is way to specify the number of agents to create and their actions in a .scm file?

Now, all my agents and their actions are created manually in buildobjects(); and buildActions() (FCall) respectively.

What i want to achieve is to define different characteristics for every agent i create. I have one type of agent but I want each agent i create to do a different action.

ie. There are one type of agent - Machine. A Machine agent has many possible actions.

I want to create N Machine agents. I want each Machine I create to do a different action throughout the simulation.

I am able to specify model parameters in the .scm file. But could the .scm file be further extended to define agent actions and agent creation?


Thanks!


_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

[Prev in Thread] Current Thread [Next in Thread]