from initialParams import initializeParams
from splitUI import splitUI
from print_output import print_output, save_summary
from button_combinations import find_buttons


############################################
start_time = time.time() 

##########################################
# Parallel programming stuff -- IF NOT USED : batch_tot=1
batch_num = str(sys.argv[1])
batch_tot = str(sys.argv[2])

# Defining Parameters
params = initializeParams(batch_num)
n_start, n_end = splitUI(batch_num, batch_tot, params)

#############################################
# For saving toplist
objective = -1
top_UI = 3*[] #([([],[],policies,100)])*params.top
top_UI_summary = [] # []*params.top #np.zeros((params.top,3))

############################################
## Parameters for generating UIs
n = params.num_states*params.num_states
bit_len = '0'+repr(n)+'b' # binary form, lenght | e.g. format(4, '016b')

############################################
#Time
Exemple #2
0
idx = 0
for line in lines:
    item_info = line.split(',')

    tags.append(item_info[0])
    x_coord[idx] = float(item_info[1])
    y_coord[idx] = float(item_info[2])
    widths[idx] = float(item_info[3])
    heights[idx] = float(item_info[4])

    idx += 1

############################################
# Initialize parameters
batch_num = 1
params = initializeParams(x_coord, y_coord, widths, heights)

##############################################
# Saving policy
policies = [([])] * params.num_states

#############################################
# For saving toplist
objective = -1
top_UI = params.top * []  #([([],[],policies,100)])*params.top
top_UI_summary = []  # []*params.top #np.zeros((params.top,3))
multi_obj_topUI = [[], [], []]

##########################################

# TODO: READ UI from the text file uis/remote.txt
It is possible to model a sensor error where the command is not recognized correctly. There are three types of errors
    * Recognition error = Command is not recognized (system does nothing)
    * Confusion error = Command is recognized as another command within the same modality.
    * User error = Error caused by the user. 

'''

import sys
import numpy as np

from RL_optimizer import rl_optimizer
from initialParams import initializeParams

## Defining Parameters
params = initializeParams()
# Set sensor errors from arguments if other than initialized ones
#params.setSensorErrors(sys.argv[2], sys.argv[3], sys.argv[4])

# Define transition matrix for each modality

# Tactile
UI1 = np.array([[
    0,
    2,
    3,
    4,
], [1, 0, 3, 4], [1, 2, 0, 4], [1, 2, 3, 0]])

# Gestures
UI2 = np.array([[