-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDEVNOTES
76 lines (66 loc) · 3.28 KB
/
DEVNOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Notes for development
Depending on competitive framework:
1: SIMPLE CASE - 1 nest
create 1 (or 2) extra scenarios for solitary (or social) foragers.
Add TRANSFER foragers to 1st scenario, rerun optimLoadCurr to get S/L/currency values (similar to "bestNests")
If nest is social:
Subtract TRANSFER foragers to 2nd scenario, rerun optimLoadCurr to get S/L/currency values (similar to "worstNests")
Compare currency values b/w 1st and BASE scenario (or 1st, BASE, and 2nd scenario)
If currency change is better than EPS
Change forager number in BEST and WORST cells in all 3 scenarios
Run optimLoadCurr for candidate cells in all 3 scenarios
Loop
2: COMPLEX CASE - 2 or more nests - ignoring other nest behaviour
Requires (n*2 + 1) sets of calculations for each iteration
Create nests:
for(i = nests)
Create 1 (or 2) extra scenarios
Scenario1 = Add TRANSFER foragers to i in BASE, rerun optimLoadCurr
If nest i is social:
Scenario2 = Subtract TRANSFER foragers from i in BASE, rerun optimLoadCurr
end
Compare nests:
for(i = nests)
Compare singular currency values b/w 1st, (2nd) and BASE scenario
end
3: COMPLEX CASE - 2 or more nests - marginalizing across other nest behaviour
Requires (n*3^(n-1)) sets of calculations for each iteration
Create nests:
for(i = nests)
Create 2 (or 3) extra scenario SETS
ScenarioSet0 = Use i in BASE
= Create combination of ADD/ZERO(/SUBTRACT) TRANSFER for all other nests
= Note: 1 of these scenarios can just be copied from BASE
= Run all scenarios through optimLoadCurr
ScenarioSet1 = Add TRANSFER foragers to i in BASE
= Create combination of ADD/ZERO(/SUBTRACT) TRANSFER for all other nests
= Run all scenarios through optimLoadCurr
If nest i is social:
Scenario2 = Subtract TRANSFER foragers from i in BASE
= Create combination of ADD/ZERO(/SUBTRACT) TRANSFER for all other nests (requires 3^(n-1) scenarios for all combinations)
= Run all scenarios through optimLoadCurr
end
Compare nests:
for(i = nests)
Compare multiple currency values b/w 'best', ('worst') and 'zero' scenarios.
Fetch single value for each cell in the entire "stack" of scenarios. Options:
Summed currencies
Mean value of currencies
Median value of currrencies
Maximum currency (best-case scenario)
Minimum currency (worst-case scenario)
Other extensions: different functions for each scenario set? (e.g. maximum from 'zero', but minimum from 'best')
For solitary: choose max(best), and min(zero) for best and worst cells
For social: choose max(diff1), and min(diff2) for best and worst cells
Etc...
end
REQUIREMENTS:
1) Set up model to deal with scenario=list(world,nests)
a) Modify optimLoadCurr to deal with & return scenarios
b) Any other functions underneath optimLoadCurr?? (Don't think they need modification)
2) Set up model preamble to deal with 'ignore' or 'marginalize' behaviour
a) BASE scenario should be in environment
b) If('ignore') each nest should have a list with 1 (or 2) scenarios, "best" (and "worst")
c) If('marginalize') each nest should have a list with 1 (or 2) scenario SETS, "best", "zero" (and "worst").
"best" should contain all scenarios
NOTE: CURRENTLY THIS WORKS ONLY FOR SINGLE-NEST SITUATION. SHOULD BE LOOPED OVER ALL COMBINATIONS OF 'MOVES' IN MULTI-NEST SITUATION. ALTERNATIVELY, IT COULD JUST USE MARGINAL SITUATION (WHAT MOVE | OTHERS), BUT THIS MAY LEAD TO STABLE OSCILLATIONS, OR TURN-BASED ADVANTAGES