-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBelieves.js
More file actions
78 lines (74 loc) · 1.78 KB
/
Believes.js
File metadata and controls
78 lines (74 loc) · 1.78 KB
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
77
78
/* EXAMPLE BELIEVES
parcels: [
{ id: 'p399', x: 6, y: 9, carriedBy: null, reward: 4, distance: 1 },
{ id: 'p402', x: 6, y: 7, carriedBy: null, reward: 4, distance: 3 }
],
deliveryPoints: [
{ x: 1, y: 0, delivery: true, parcelSpawner: false },
...
{ x: 9, y: 9, delivery: true, parcelSpawner: false }
],
me: { id: '72d283ee257', name: 'ciao', x: 7, y: 9, score: 0 },
agentsPosition: Map(1) { 'a0' => { x: 8, y: 6, score: 0 } },
config: {
MAP_FILE: 'default_map',
...
rewardDecayRatio: 0.05
}
*/
import { DeliverooApi } from "@unitn-asa/deliveroo-js-client";
export const client = new DeliverooApi(
"http://localhost:8080/",
""
);
export const believes = {
parcels: [],
deliveryPoints: [],
me: {
previousDirection: '',
},
agentsPosition: new Map(),
config: {},
heatmap: new Map(), // maybe this should be somewhere else
blackList: {
parcels: [],
deliveryPoints: [],// unreachable delivery points, if unreachable due to obstacle the delivery point will be remove within a certain timeout
spawnPoints: [],// unreachable spawn points
}
}
export const communication = {
intentionQueue: [],
shouldTheAgentAwake: false
}
export const launchConfig = {
offLineSolver: false,
}
export const mapConstant = {
map: null,
mapX: 0,
mapY: 0,
graph: null,
parcelSpawner: [],
pddlMapObjects: "",
// Initialization
pddlTiles: "",
pddlNeighbors: "",
pddlDeliveryPoints: "",
}
//Hyperparameter
export const hyperParams = {
radius_distance: 5,
min_reward: 15,
crowdedThreshold: 1,
retry:{
min_retry: 50,
max_retry: 100,
},
blackList: {
max_timeout: 1000,
min_timeout: 500,
},
max_carryingParcels:100,
reasonable: 0.9,
randomMoveChance: 5,
}