source: java/main/src/main/resources/info/Population.info @ 107

Last change on this file since 107 was 107, checked in by psniegowski, 11 years ago

HIGHLIGHTS:

  • add SimultorProviders? hierarchy
  • start Framsticks server over SSH
  • FJF compatible with Framsticks 4.0rc3
  • reading and writing of standard.expt
  • a proof-of-concept implementation of StandardExperiment?

CHANGELOG:
Optionally return FreeAccess? from registry.

Add SimulatorRange?.

StandardExperiment? with genotypes circulation.

Automate registration around StandardState?.

More improvements to StandardExperiment?.

Skeleton version of StandardExperiment?.

Test saving of StandardState?.

Standard experiment state is being loaded.

More development towards StandardState? reading.

Work on reading standard experiment state.

Add classes for standard experiment.

Update example standard.expt

Add FreeAccess? and FreeObject?.

Made compatible with version 4.0rc3

Change deserialization policy.

Improve SSH support.

Working running simulator over SSH.

Fix joining bug in Experiment.

Working version of SimulatorRunner?.

Add more SimulatorProviders?.

Working PrimeExperimentTest? with 4.0rc3

Add references to deserialization.

Add OpaqueObject? and it's serialization.

Add deserialization of dictionaries.

Partial implementation of deserialization.

Add more tests for deserialization.

Prepare tests for deserialization.

Add proper result to prime experiment test.

Minor fixes to simulators providers.

Draft version of SimulatorProvider?.

Add SimulatorProvider? interface.

File size: 6.0 KB
Line 
1class:
2id:Population
3
4prop:
5id:index
6name:group index
7type:d
8flags:35
9
10prop:
11id:name
12name:Group name
13type:s
14
15prop:
16id:size
17name:Number of creatures
18type:d
19flags:3
20
21prop:
22id:energy
23name:Energy calculation
24type:d 0 1 1
25help:If turned off, creature's energy will be constant.
26
27prop:
28id:death
29name:Death
30type:d 0 1 1
31help:Do creatures die when no energy?
32
33prop:
34id:nnsim
35name:Neural net simulation
36type:d 0 2 1 ~Off~Immediate~After stabilization
37help:Stabilization means no significant movement during a specified period of time.
38
39prop:
40id:perfperiod
41name:Performance sampling period
42type:d 0 1000000 100
43help:Defines how often onUpdate() events are called. Also used to compute partial performance of creatures (distance, speed, etc.) and to determine stabilization.
44
45prop:
46id:stabilperiod
47name:Sampling period while waiting
48type:d 0 1000000 100
49help:"Performance sampling period" for the stabilization phase.
50
51prop:
52id:killnostable
53name:Kill if no stabilization after
54type:d 0 10000000 1000000
55help:Creatures that fail to stabilize after the specified waiting period (e.g. because they are continuously rolling) will be killed. 0 disables this feature.
56
57prop:
58id:stabledist
59name:Allowed distance to be stable
60type:f 0 1 0.01
61help:A creature is considered stabilized when its center of gravity stays within the specified distance after the "Sampling period while waiting" has elapsed.
62
63prop:
64id:enableperf
65name:Performance calculation
66type:d 0 2 1 ~Off~Immediate~After stabilization
67help:Stabilization means no significant movement during a specified period of time.
68
69prop:
70id:colmask
71name:Collision mask (deprecated)
72type:db 0 65535 0
73flags:32
74help:DEPRECATED. You should use selfmask and othermask (these masks are also much easier to understand than the old colmask field).
75
76prop:
77id:selfmask
78name:Collision mask (self)
79type:db 0 2147483647 0
80flags:32
81help:~
82Collisions between objects can be handled in two ways:
83 - standard 'mechanical' collision (simple 'rebound' effect)
84 - special script handler (On[GROUPNAME]Collision function)
85
86In the script handler function, use the Collision object to access the two colliding parts of two creatures.
87The first part in the Collision object (i.e. Collision.Creature1) always concerns the creature that belongs to [GROUPNAME].
88The handler is called once for each creature that collides with the creature from [GROUPNAME].
89
90Collision masks determine which one will be used (none and both are also possible). On each collision, selfmask and othermask of the colliding objects are logically ANDed. 16 lower bits (0xffff) enable the standard handler. 16 higher bits (0xffff0000) enable the custom handler.
91Examples:
92
931.With one group, all possible combinations of the collision handlers are as follows:
94  - ignore collisions (e.g. selfmask=othermask=0)
95  - use standard handling (e.g. selfmask=othermask=1)
96  - use custom handling (e.g. selfmask=othermask=0x10000)
97  - use standard and custom handling (e.g. selfmask=othermask=0x10001)
98
992.Two groups yield more interesting cases. Let us consider the 'standard.expdef' setting:
100  Creatures: selfmask=0x10001, othermask=0x20001
101  Food colmask = selfmask=0x20002, othermask=0x10002
102There are three possible scenarios:
103- creature and creature: collision value = 0x10001 & 0x20001 = 1 -> Standard handling will be used (1 is one of the lower 16 bits)
104- food and food: collision value = 0x20002 & 0x10002 = 2 -> As above.
105- creature and food: collision value = (0x10001 & 0x10002) or (0x20002 & 0x20001) = 0x10000 or 0x20000 -> Custom handling will be used (higher 16 bits).
106~
107
108prop:
109id:othermask
110name:Collision mask (other)
111type:db 0 2147483647 0
112flags:32
113help:See selfmask.
114
115prop:
116id:bodysim
117name:Body simulation
118type:d 0 1 1
119help:Enable/disable physical body simulation. This is the initial value of Creature.bodysim for all objects created in this group. For details, see the documentation of Creature.bodysim.
120
121prop:
122id:selfcol
123name:Detect self-collisions
124type:d 0 1 0
125help:Detect collisions within creature bodies (only applicable for the ODE simulation engine). This is the initial value of Creature.selfcol for all objects created in this group. If enabled, creatures with self-colliding genotypes are not born, and others will have their sticks collide during lifespan.
126
127prop:
128id:em_stat
129name:Muscle static work
130type:f 0 1 0
131help:~
132Energy requirements for a muscle
133resisting an external force~
134
135prop:
136id:em_dyn
137name:Muscle dynamic work
138type:f 0 1 0
139help:~
140Energy requirements for a muscle
141moving a stick~
142
143prop:
144id:en_assim
145name:Assimilation productivity
146type:f 0 1 0
147help:~
148Maximal energy gain produced by a vertical specialized stick.
149Horizontal specialized sticks get half of this value.~
150
151prop:
152id:createFromGenotype
153name:
154type:p oCreature()
155flags:34
156help:Uses the selected Genotype object
157
158prop:
159id:createFromString
160name:
161type:p oCreature(s genotype)
162flags:34
163help:Uses the supplied string argument
164
165prop:
166id:createFromGeno
167name:
168type:p oCreature(oGeno)
169flags:34
170help:Uses the supplied Geno object
171
172prop:
173id:findUID
174name:find creature by UID
175type:p d(s uid)
176flags:34
177
178prop:
179id:get
180name:get creature object
181type:p oCreature(d index)
182flags:34
183
184prop:
185id:senseCreaturesProperty
186name:senseCreaturesProperty
187type:p f(f x,f y,f z,s propertyname,oCreature exclude)
188flags:34
189help:~
190arguments:
191 - x,y,z (sensor position)
192 - property (name, name[index] or Class:id). name[index] can be used for Vector objects inside the user fields, eg "user2[10]"
193 - exclude (creature object)
194works like a smell sensor for a given property (for all creatures in this group except "exclude").
195The following function reproduces the "classic" framsticks "S" sensor:
196function smellReceptorValue(x,y,z,exclude)
197{
198var i,s=0; for(i=0;i<Populations.size;i++)
199        s+=Populations[0].senseCreaturesProperty(x,y,z,"energy",exclude);
200return s;
201}~
202
203prop:
204id:findCreatureAt
205name:
206type:p oCreature(oVector point,oVector vector)
207flags:34
208
209prop:
210id:delete
211name:
212type:p(d creature index)
213flags:34
214help:delete creature
215
216prop:
217id:kill
218name:
219type:p(d creature index)
220flags:34
221help:kill creature
222
223prop:
224id:creatures
225name:Creatures
226type:l Creature uid
227
228prop:
229id:creatures_changed
230name:creatures list changed
231type:e ListChange
232
Note: See TracBrowser for help on using the repository browser.