-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauv_mdp.py
45 lines (34 loc) · 1.1 KB
/
auv_mdp.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
__author__ = 'nick'
"""
Testing of mdp communications policy for AUVs with MILP value functions
"""
from sim_auv import AuvExecutor
from sim_auv_planner import AuvPlanner
from msgs import *
from target import Target
from pipe import Pipe
from value_iteration import vi
import numpy as np
"""
Must create a play game function. Where I will create all the stuff needed to run. Also will have to create targets in
an incremental fashion. In that way I can calculate the transmission policy.
"""
def play_a_game():
"""
1. Randomly generate targets
2. Whenever a new observation is made we calculate the communication policy and decide to communicate or not.
3. For the communication policy we create all the different non communicated target combinations and generate the
appropriate states.
4. The game runs until the max time is reached.
"""
pass
def main():
num_games = 1000
rewards = np.zeros(num_games)
for i in range(num_games):
# Play a game
# Collect reward in array
pass
print(rewards.mean())
if __name__ == '__main__':
main()