-
Notifications
You must be signed in to change notification settings - Fork 0
/
methods.py
48 lines (32 loc) · 1007 Bytes
/
methods.py
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
from pyhop import *
from world import MoosWorld
state = State('state')
# state.vessels contains the information about the fisher vessels
# format : state.vessels = {"fisher1" : world.Vehicle, "fisher2" : world.Vehicle}
state.vessels = {}
# state.agent contains the information about the remus (agent)
# format : state.agent = world.Vehicle
# this is not a dictionary don't be fooled by the initialization
state.agent = {}
# state.mines is the list contains the detected mines
# format : state.mines = [world.Mine, world.Mine, ...]
state.mines = []
# initialization of the MoosWorld
world = MoosWorld(state)
'''
To update the world (This updates dictionaries)
world.update_world()
To move remus
world.apply_agent_action(cx.y)
To remove mines
world.remove_mine(mine)
'''
def achieve_goals(state):
"""
:param state: Pyhop state
:return: To be decided
"""
# updates the world
world.update_world()
def declare_methods():
declare_methods("achieve_goals", achieve_goals)