Assignment A3

Social Forces


Description

Implementation
We implemented the social forces model as discussed in class, however we use A* search to guide the agents. This prevents them from blindly walking towards their end goal even if an obstacle is preventing them from progressing further. The benefits of merging social forces with A* are clearly seen in the bottleneck-evacuation testcase.

TestCase 1: bottleneck-evacuation
$ ./steersim -testcase bottleneck-evacuation.xml -ai sfAI

Score for bottleneck-evacuation with 2000 frames:
total number of agents: 200
avg. number of collisions per agent: 52.62
average time spent by one agent: 99.6527
average energy spent by one agent: 1873.58
sum of instantaneous accelerations: 4748.21
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*52.62 + 1*99.6527 + 1*1873.58 + 1*4748.21 = 9352.44
final score: 9352.44

TestCase 2: hallway-one-way
$ ./steersim -testcase hallway-one-way.xml -ai sfAI

Score for hall-way-one-way:
total number of agents: 200
avg. number of collisions per agent: 0
average time spent by one agent: 84.3658
average energy spent by one agent: 1501.65
sum of instantaneous accelerations: 9.2831
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*0 + 1*84.3658 + 1*1501.65 + 1*9.2831 = 1595.3
final score: 1595.3

TestCase 3: hallway-two-way
$ ./steersim -testcase hallway-two-way.xml -ai sfAI

Score for hallway-two-way:
total number of agents: 200
avg. number of collisions per agent: 0.61
average time spent by one agent: 73.8064
average energy spent by one agent: 1295.55
sum of instantaneous accelerations: 181.184
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*0.61 + 1*73.8064 + 1*1295.55 + 1*181.184 = 1581.04
final score: 1581.04

TestCase 4: hallway-four-way
$ ./steersim -testcase hallway-four-way.xml -ai sfAI

Score for hallway-four-way:
total number of agents: 400
avg. number of collisions per agent: 1.205
average time spent by one agent: 75.7607
average energy spent by one agent: 1333.9
sum of instantaneous accelerations: 286.387
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*1.205 + 1*75.7607 + 1*1333.9 + 1*286.387 = 1756.3
final score: 1756.3

Extra credit
The agents perform reasonbly well in testcases containing non-axis aligned obstacles. We have not attempted to generalize social forces to three spatial dimensions.

TestCase 5: hallway-four-way-rounded
$ ./steersim -testcase hallway-four-way-rounded.xml -ai sfAI

Score for hallway-four-way-rounded:
total number of agents: 400
avg. number of collisions per agent: 1.005
average time spent by one agent: 75.6843
average energy spent by one agent: 1333.37
sum of instantaneous accelerations: 276.973
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*1.005 + 1*75.6843 + 1*1333.37 + 1*276.973 = 1736.28
final score: 1736.28

TestCase 6: hallway-four-way-roundabout
$ ./steersim -testcase hallway-four-way-roundabout.xml -ai sfAI

Score for hallway_four_way_roundabout:
total number of agents: 400
avg. number of collisions per agent: 1.2
average time spent by one agent: 75.7445
average energy spent by one agent: 1334.06
sum of instantaneous accelerations: 286.542
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*1.2 + 1*75.7445 + 1*1334.06 + 1*286.542 = 1756.35
final score: 1756.35

TestCase 7: hallway-four-way-rounded-roundabout
$ ./steersim -testcase hallway-four-way-rounded-roundabout.xml -ai sfAI

Score for hallway_four_way_rounded_roundabout:
total number of agents: 400
avg. number of collisions per agent: 1.205
average time spent by one agent: 75.7539
average energy spent by one agent: 1333.95
sum of instantaneous accelerations: 286.528
(alpha, beta, gamma, delta) weights: (50,1,1,1)
weighted sum: 50*1.205 + 1*75.7539 + 1*1333.95 + 1*286.528 = 1756.49
final score: 1756.49

Documentation | Github