Labbook 2004
31 August 2004
- Made a CVS root directory in /home/arnoud/projects/roboresc/ with
cvs init. Added project simulation_system with cvs import from
rescue-0_44-unix (after cleaning). Tried to branch, bugfix and merge,
but did tag only in the behaviour directory, so all other files are
removed if I merge (even after doing correct tagging). Branched again,
now stable_1_2. So, only use explicit tags from now on!
15 August 2004
- We became 3th in the Rescue Middle Earth competition. Although I
was able to improve the score with a factor of 2 in two days, we are
far off good competition code. To improve the code a lot of work has to
be done in testing the selection-functions. Stef and Maurits have
created many fast functions, but finetuning will be a lot of work.
- This inspired me on the course of the next Rescue Master
project. Make a process that is able by farming to find out which agent
has the best behaviour for that location. We could use agents from
different teams, when we are able to translate their messages. This
would require a common agent language <- research question.
14 August 2004
- Added Patrol behavior when no big or small fires in sight. Qualification score improved to 24.2.
- Also tried to let the Police stay in the Refuge when damaged
to the Police, but I corrupted their state-machine, because they all
became idle (on the road) after a while. The think process of the
Police is still very unstructured, so I left it with that.
13 augustus 2004
- Added some new activities at the end of the think process, because
around cycle 20 the fire agents have no clue what to do (the other
firefront is too far away to see). Two new activities are added when
idle. One possability is to refill the watertank, the other possibility
is to go to the neighbourhood of the big fires, to search for the
firefront. Score improved to 23.6.
12 augustus 2004
- Changed the algorithm to find the next building to extinguish. You
can now select the nearest (locally) or also take into account the
distance to the center. Added a new function to the Grid for that.
- Yet, the main improvement was found in the solve Conflict
routine. In the first cycles the Fire Agents are still caught by
roadblocks. By extinguishing Fires while waiting, the fire in the south
can be controlled. Score improved from 13.0 -> 23.1
- Late in night repaired a small bug, that had the effect that
the Fire agents continued extinguishing the same building while better
alternatives were at hand. Score is still 23.1, because the firefronts
are already to wide to be stopped.
11 augustus 2004
- Created UvA.sh
according to the requirements of the Rescue Middle Earth. Changed
main.cpp so that it can now specify the kernel socket port and more
than one center(-A -F -P option) . The is not tested for multiple
centers. The default numbers of agents are center are now zero.
9 augustus 2004
- Added Strategy and a Prediction works, after protecting behaviour::Predict for empty SituationModels?:
aStrategy = new Strategy (NULL, NULL, aBehaviour, 0.1f);
aSituationModel = aBehaviour->Predict(aStrategy);
- Ambulances flee now to the refuges, and escape roadblocks by
random-travels. Score still 13.11 (ambulances are on the road already,
and apperently do not block the paths for the others).
5 augustus 2004
- Crash opgelost. Police zocht dichtbijzijnde Firebrigade, maar de
locatie is niet altijd bekend (waarschijnlijk te maken met de onbekende
agents bij de worldupdate. Als de locatie niet bekend, wordt die agent
overgeslagen. Score 13.11.
- Added a Strategy and a Prediction. It compiles and links, hopefully it runs.
aMember = new TeamMember ((ImaginaryHuman*)this);
aStrategy = new Strategy (NULL, aMember, aBehaviour, 0.1f);
aSituationModel = aBehaviour->Predict(aStrategy);
5 augustus 2004
- Ik had problemen om rescue-0_44-unix/freeway gecompileerd te
krijgen. (ctype not defined). Als ik echter in pkgrc gcc weghaal, ga ik
van gcc-2.95.3 naar 3.2.2-5, en is het probleem over.
- Worldmodel.cpp:126 assertion 'h' failed. UvArescue2004?/think is misschien nieuwer (alhoewel 13 mei). Score 12.99.
- Removed assertion to an if-statement. Normally worldupdate
works, but 815 times not. this are small numbers (0, 128908, 25990297,
2327669). Maybe civilians. 7 buildings are extinguished, score 13.16.
- Analysed behaviourtravel: new version Predict(Strategy), before Predict(Situation,TeamMember?)
- behaviourpatrol toegevoegd. Ongeveer gelijk aan travel. Na 45
cycles crashed het programma zonder verdere vermelding. Maximale random
getal is 1444.
- behaviour.GetDestination? toegevoegd. Na 18 cycles crashed het programma zonder verdere vermelding. Nu wel half random, half Patrol/Flee?. Een ambulance bereikt een refuge. Andere staan vast / stil.
26 juni 2004
Gekeken naar teams die hun source-code beschikbaar hebben gesteld. Tot nu toe:
En van 2003:
Directe links http://cs.uwindsor.ca/~liangc/links.htm
23 juni 2004
- Simulator (behalve Civilians) aan de praat gekregen op een
Windows-machine, doch de Firesimulator lijkt achter te lopen (pas in
cycle 25 vuurhaarden.
18 juni 2004
17 juni 2004
2 juni 2004
make -f Agents.mak clean
Vervolgens moet je je X11 pad instellen:
export X11=/usr/X11R6 <- zelf juiste pad opgeven...
Opnieuw maken:
make -f Agents.mak
14 mei 2004
- officiele versie 0.44 geinstalleerd op havik, doch de kernel gaat
reeds lopen voordat de andere simulatoren contact hebben kunnen maken.
13 mei 2004
- Maurits zijn code geupgrade naar version 0.44. Libadk bevat geen
start, loop, end meer, alleen go. Firedanger bevatte een hash tabel
gebaseerd op een 16-bits building->id, hetgeen vervangen is door een
berekening. Code loopt, doch blijft hangen bij Initiating Police
Center.
- start, loop, end geherintroduceerd, doch is niet de reden van hangen initialisatie.
- mijn freeway werkt ook (na bugfix fire_dump). Echter, in mijn
config stond msg_size nog op 80, terwijl Stef uitgaat van 256. Kortom,
met de communicatie op deze manier uitgeschakeld komt de score voor
Middle-Earth nu op 22.549.
- Met de msg_size op 256 krijgen werkt de communicatie.
Echter, als alles draait op squid heeft dit alleen maar een negatief
effect, en komt de score op 12.99.
- Added behaviourIdle toegevoegd aan AmbulanceAgent?. Werkt echter alleen continue, ipv van de helft van de tijd.
12 Mei 2004
Back to 16 March.
- findSectors (argument error) is only used in behaviourpatrol, and added protection against empty object there.
- crashes originated from behavioursweeppath. Moved clearing to
the front, which prevents crashing, but police seems to clear now
cleared roads. Everybody waits for CP_EXCHANGE. Agents finish far after
kernel. Q2004 score 5.78.
- behavioursweeppath has to do pathplanning, because you want
to now if the path only contains one element. Changed aExec->self()
for position(). Changed act_tell for CP_READY. Changed position() to
self(). Problems remains the same, when mClear == mPosition you get a
segmentation problem. Stef has found two bugs in freeway,
plus had also segmentation problems. So try to upgrade to version 0.44.
11 Mei 2004
- setenv CVS_RSH ssh; cvs -d esra.xs4all.nl:/home/cvsroot checkout
freeway gedaan, tar-file gemaakt, en beschikbaar gesteld aan Krijn
Wielinga, TU Delft.
- 2viewer.sh -l ~sbmpost/public_html/RCR/logfile/rescue.log laat de kwalificatie voor Rescue MiddleEarth?
zien. De agents beginnen sterk met het blussen van vier gebouwen, doch
daarna raken ze het vuurfront kwijt. Op een gegeven moment verzamelen
de firefighters voor een refuge die ze niet kunnen bereiken, terwijl de
politie voornamelijk de highways patriouilleerd. Score 19.71.
15 April 2004
- setenv CVS_RSH ssh; cvs -d esra.xs4all.nl:/home/cvsroot checkout freeway -> Permission denied
5 April 2004
- agents in general: each agent implements think() differently.
Selection between different behaviours is implemented there. The
alternation between behaviours is implemented as a state machine. In
principle it increments the state everytime a behaviour has succeeded.
It checks every cycle if the preconditions for this state still holds,
if not it jumps back to a previous state. In the next description the
different states are numbered from start to finish.
1 find the nearest building that needs to be extinguished.
2 travel towards that building and then find the nearest fireagent
3 travel towards the fireagent and then find the nearest refuge
1 find the nearest building that needs to be extinguished.
2 travel towards neighbor object and start to extinguish the building
x during travel, if there is an obstruction, check for other nearby fired buildings
x if near building meets extinguish distance criterium, make it the new target
x alternate between: [travel towards new neighbor object] and [extinguish near building]
3 As soon as the watersupply becomes empty, travel toward nearest refuge to refill
- like the other agents, broadcast (TELL messages) with their location and destination
1 at this moment only travel randomly across the map
The overal view is that the police and the fireagents individually
do a good job, but coordination is missing. For instance the fireagents
try to fight a fire area alone which they never can handle. Further
they concentrate on the buildings just behind the fire front, instead
of the buildings just before. The policeagents concentrate too much on
the current position of the fireagents instead of their intentions.
- An alternative and probably better approach is to concentrate on a
single fired area a time, where policeagents secure the outer regions
of the area and 3 teams of fireagents approach from different sides and
concentrate on a single building.
- Note that appearently FireAgents?
try to extinguish buildings not matching the distance criterium (the
kernel complains about this). Currently, eventhough a succesfull refill
at a refuge may have occured, a fireagent will choose to travel towards
a closer refuge which may be unreachable due to blockades.
29 March 2004
- fixed wrong sender addition to mapping and found 2 additional bugs:
- % instead of == symbol in exchange function <- fixed
- using it for received in init instead of it1 <- fixed
- changed agent->status mappings to single status mapping
- distibution of locations works for both SYNC and NOSYNC now
- succesfull execution of NOSYNC a=4,f=4,p=4, SYNC a=5, f=5, p=5
- *_faulty logs show that the kernel loses messages
- started to implement solveConflicts, concentrating on deblocking
- need to optimize solveConflicts as it calls travel too often
- generate move_path on the fly when making room for others agents
- improve findPath by precomputing
23 March 2004
- SBM: path finding succesfully implemented
- SBM: additional cleanups, improved viewer/debug messages
- SBM: solving local path conflicts first, then concentrate on police/fire agent behaviours
18 March 2004
- SBM: removed many dependencies in the code. Parts of Summary class reused in WorldModel? class, unnecessary parts removed.
- SBM: moved sector code from WorldModel? class into classes: Grid,Sector
- SBM: removed SituationModel/Behaviour?/ImaginaryObject? classes and changed DataForm/ViewerWindow? classes accordingly.
- SBM: preparing to reimplement Path finding algoritm, using old code from maurits.
- SBM: preparing to implement Police deblock behaviour using Highways which were added to the Grid class.
16 March 2004
- This time we started the simulator with fire-manager, resulting in a crash after 6 cycles in findSectors (argument error).
15 March 2004
- Assertion `fieriness' fired on a report of a building buring with
fieriness zero, probably because we started the simulator without
fire-manager. Made a warning from the assertion, and now it runs to the
end, altough the log is only at cycle 185 while the kernel is already
finished. Q2004 score 9.86, because fire-agent 2330 is buried, and not
saved by any ambulance.
10 March 2004
- Protected CenterReceive?
against strange messagesizes. The strange message was a PP_COMM with
size 70. Maybe a nearby say. Now it crashes at Summary::parseFire at
Assertion `fieriness && fieriness < (1 << 3)' at cycle
26.
- Behaviourpatrol uses Summary::getFire(). The getters are
untouched, and the mFire data is zerod by Summary::Build(), which is
called by Worldmodel::analyzeMap and duplicateModel, which are called
at BasicActor?::init. The Fire is updated in Summury::arSectorA? and Summary::Update. The Summary::Update is called from BacisCenter?::update, BasicAgent?::update(COMM), communicateWorld(OLD_COMM). arSectorA? is called from BasicAgent?::Exchange(OLD_COMM) and is commented out in BasicAgent?::cExchange(COMM). So, this should also work.
- Behaviourclear uses Summary::getHighway(). The getters are
untouched, and the mHighway data is filled by Summary::Build(), which
is called by Worldmodel::analyzeMap and duplicateModel, which are
called at BasicActor?::init. So, clear should work.
- Stef made a diff between the two code-bases. The assert was
due to a difference in message-size (80 ipv 248). This size has to be
consistent with the config.txt -> Use config.say_max_bytes() instead
of MSG_SIZE.
9 March 2004
- setenv CVS_RSH ssh; cvs -d esra.xs4all.nl:/home/cvsroot checkout rescue
- Protected Worldmodel::findSectors if called with empty
object. Changed the FIXED number of agents per center from 5 to 3. In
the viewer you can switch between agents with '*' and '/'. The
function-buttons change the info that is displayed. Assertion in
Summary::centerReceive failed after 14 cycles in a PP_COMM R.
Previously this PP_COMM worked.
- Initiated some empty messages. Communication starts. Police,
Fire and Ambulance Centers (1955, 1758, 1841) -> CC_READY at cycle
4, after 4 Tells. The Police and Fire Centers do a Center Exchange at
cycle 5. Process dies on findSectors of Police Agent 2414 doing the
first Sweep at cycle 6.
- Rebuild behaviour, because two behaviours include Summery.h.
Q2004 runs, and not only Stef needs Centers. Further, we have activate
spam_communication. Q2004-score 52.88. Our qualification-log has score
12.77, but a lot more activity. The score are maybe different
map-settings. The activity is because the agents die after cycle 4. Is
this due to the wrong map (still Kobe for the agents).
8 March 2004
- Compiled agents with #ifdef COMM. Should rebuild behaviour,
because two behaviours include Summery.h. Also, we should use another
Test, because Stef needs Centers. Further, we should activate
spam_communication.
- Looked at both codes. Fire, Ambulance and Police-agent.cpp
are equal. Worldmodel.cpp differs a bit, but main difference in Basic
Center and Agent.cpp. Marked changes with #ifdef OLD_COMM in Basic
Center, and same Test-score 8.87. Policeagents performed 1066 Sweeps,
and extinguish fire around cycle 228. With changes in Basic Agent, we
get the same Test-score, but the stderr is only at cycle 166 when the
simulation is finished. Yet, 1073 Sweeps, and extinguish fire around
cycle 223.
- put a limit on Basic Agent::think of step/6. Print only
behaviour execution, including thinking time. Test-score 8.88.
Fireagents start extinguished fire around cycle 228. Policeagents
performed 1066 Sweeps.
- put a limit on Basic Agent::think of step/5. Do not print
performance anymore, only behaviour execution. Test-score 8.68.
Fireagents start extinguished fire around cycle 216. Policeagents
performed 1063 Sweeps.
- put a limit on Basic Agent::think of step/4. Still thinking
of 460 ms possible. Do not print behaviour selection anymore. Printf
are less far behind viewer, and finish. Test-score 9.52. Many
Policeagents moved and cleared (789 Sweeps), fireagents start
extinguished fire around cycle 286
- put a limit on Basic Agent::think of step/3. No thinking
longer than 500 ms anymore. Printf are far behind viewer (140 cycles).
Test-score 8.79. Many Policeagents moved and cleared (515 Sweeps), no
fire extinguished.
5 March 2004
- included some extra VIEWER defines to be able to compile agents under cygwin.
4 March 2004
- added -m option also to Stef's code. Now it runs. This time, our
viewer is ahead of the standard viewer, but disappears after 12 cycles,
due to an Assertion in Basic Actor.cpp:98. The rescue agents are not
moving, so this is a good reference run. Kobe-score 48.14.
- changed the act_policy from ONCE_WHEN_IDLE to
ONCE_PER_SENSE, and added protection in think. It runs with the default
map the agents cannot connect: score 6.06. With the Kobe map the
program exits at cycle 4 without error-message. Removed the protection.
Now it works, but many thinks are longer than 500 ms => put limit on
think. With java -jar viewer-0.12.jar -l rescue.log in programs/viewer
you can see the result: Kobe-score 63.82. Not much movement after cycle
40. No building extinguished.
3 March 2004
- added new option -m to agents/main.cpp, which reads the correct
number of agents from the gisini-file. Maurits his code runs now,
Kobe-score 59.24. Fire agent 2406 Moved.
- in agents/main.h the meaning of debug-levels is explained.
Activated performance and behaviour selection & execution. VC-score
64.26.
< 19: Executing task Patrols
Time 19: Agents (2508-2514) get task Fight fire 16 according to Police Agent 2514, who starts to Travels to sector 16 => Move: 499 -> 1020.
Time 20: Police Agents (2515-2516) also get task Fight fire 16 and agent (2515) start to Travel => Move: 528 -> 1015
Ambulance Agents (2506-2507) get task Rescue 20, but Travel to sector 20 (predicted to fail) => Idle ? Rescue Current Sector
Fire Agent 2510 still executes task Patrol => Move: 20 -> 657
Time 21: Police Agent (2512) also get task Fight fire 16 and start to Travel => Move: 516 -> 1028
Time 22: Police Agent (2514) realises that Fire Agents (2508-2511) are Idle and (2512) Travels to 16 -> Recon 16 => Move: 248 -> 789
Time 23: Police Agent (2516) comes to same conclusion => Move: 222 -> 800
Time 24: Ambulance Agent (2506) still wants to Travel to sector 20 (predicted to fail) => Idle
Executing Travel to sector 20 by Fire Agent 2510. => Move : 472 -> 902.
Time 25: Police Agent (2512) also realises that Fire Agents (2508-2511) are Idle -> Recon 16 => Move: 224 -> 824
Time 26: Police Agent (2514) thinks that the Idle Fire Agents (2508-2511) want to Travel to sector 20. So the Police Agent also wants to Travel to sector 20 (predicted to fail) -> Select Sweep path [ 1140 - 853 ]) => Move: 1140 -> 345
Police Agent (2516) comes to same conclusion => Move: 1140 -> 345
Time 27: Fire Agent (2510) wants to Travel to sector 20 (predicted to fail) -> Executing Refill at 1883 => Move: 357 -> 876.
Time 28: Police Agent (2512) Predicts Police Agent (2514) Travel to sector 16 -> Executing Recon 16 => Move: 816 -> 241.
Time 29: Police Agent (2514) still wants to Travel to sector 20 (predicted to fail) -> Select Sweep path [ 345 - 853 ]) => Open: 345 (3%)
Police Agent (2516) comes to same conclusion => Open: 345 (3%)
Time 31: Fire Agent (2510) wants to Travel to sector 20 (predicted to fail) -> Executing Refill at 1883 => Move: 70 -> 670.
Time 32: Police Agent (2512) Predicts Agent (2513) & Agent (2514) Travel to sector 16 -> Executing Recon 16 => Move: 785 -> 234.
Time 33: Police Agent (2516) Predicts Agent (2515) & Agent (2516) Travel to sector 20 -> Executing Recon 20 => Move: 345 -> 891.
Police Agent (2514) still wants to Travel to sector 20 (predicted to fail) -> Select Sweep path [ 345 - 853 ]) => Move: 345 -> 891
Time 35: Fire Agent (2510) thinks that it can now Travel to sector 20 => Move: 218 -> 774
Police Agent (2512) cannot Travel to sector 20 -> Sweep path [ 802 - 853 ]) => Open: 223 (19%)
Time 291: Executing Free 2509 by Police Agent 2512
- Rerun Kobe with activated performance and behaviour selection
& execution. Kobe-score 59.09. The first fire is seen at cycle 9
for Kobe. One building saved in sector 18 from cycle 15-39. Another
building is saved by the same agent (2413) in that sector from cycle
62-86. At the cycle 298 it does a last attempt. In between it is Idle
because it has assigned to another sector, which is impossible to
reach.
Maurits suggests to increase the cycletime with a factor 4 to be
able to use the viewer. Further it is wise to use less roadblocks. I
will look for that in the Padua games. Further the late start of the
Rescue 20 and Fire Fight 16 at cycle 20 are maybe due to the
Communication-model, which is the Augustus 2003 version. The current
Communication-model should be faster.
2 March 2004
- Received source-files of Stef and Maurits. With the libraries and Makefile from Maurits the code of Stef compiles.
- With the config.txt and all.sh from ~/projects/roboresc/mfassaer xterm-9 says: Connection failed: 'no more agent'
- start.sh has titles for xterms. Tried again with config.txt from ~/mfassaer/RCR/rescue/boot. Logs says:
Connect: Ambulance Center
Connecting... FAILED! (81)
Connect: Ambulance 1/2
Connecting... FAILED! (81)
Connect: Reached maximum number of Ambulance connects
- Stef uses nowindow.sh instead of start.sh. Most important
difference is the map. start.sh Kobe works better, until Civilians
(xterm-9) says again: Connection failed: 'no more agent'
- Maurits zijn code compileert wel met op path.h regel 95:
return vector<Object*>::operator[](aPos);
Formatting Help?