Ejemplo n.º 1
0
import copy
import time
import random
import numpy as np
from pprint import pprint


from pystarworlds.Agent import new_sensor

from ..evaluate import EvalTracking, EvalTime, EvalScale

from .agent import ICUMind, ICUBody
from ..perception import WarningLightPerception, ScalePerception, TrackPerception, FuelTankPerception, PumpPerception, EyeTrackerPerception, HighlightPerception
from ..action import ICUAction, InputAction

ICUEvalSensor = new_sensor('ICUEvalSensor', WarningLightPerception, ScalePerception, TrackPerception, FuelTankPerception, PumpPerception, EyeTrackerPerception, HighlightPerception)

LABELS = SimpleNamespace(switch='switch', slide='slide', click='click', highlight='highlight',
                             gaze='gaze', saccade='saccade', key='key', move='move', change='change',
                              fuel='fuel')

KEY_CODES = {"Up":98, "Down":104, "Left":100, "Right":102}

class Evaluator(ICUMind):

    def __init__(self, config, window_properties):
        super(Evaluator, self).__init__()
        self.config = config
        self.window_properties = window_properties
   
        self.components = set(list(window_properties['fuel'].keys()) + list(window_properties['system'].keys()) + list(window_properties['track'].keys()))
Ejemplo n.º 2
0
__email__ = "*****@*****.**"
__status__ = "Development"

from types import SimpleNamespace
from collections import defaultdict
import copy
import time

from pystarworlds.Agent import new_sensor

from .agent import ICUMind, ICUBody
from ..perception import WarningLightPerception, ScalePerception, EyeTrackerPerception, HighlightPerception
from ..action import ICUAction

ICUSystemSensor = new_sensor('ICUSystemSensor', WarningLightPerception,
                             ScalePerception, EyeTrackerPerception,
                             HighlightPerception)


class ICUSystemMind(ICUMind):

    LABELS = SimpleNamespace(switch='switch',
                             slide='slide',
                             click='click',
                             highlight='highlight',
                             gaze='gaze',
                             saccade='saccade',
                             change='change')

    def __init__(self, config, window_properties):
        super(ICUSystemMind, self).__init__()
Ejemplo n.º 3
0
__email__ = "*****@*****.**"
__status__ = "Development"

from types import SimpleNamespace
from collections import defaultdict
import copy
import time
import pprint

from pystarworlds.Agent import new_sensor

from .agent import ICUMind, ICUBody
from ..perception import FuelTankPerception, PumpPerception, EyeTrackerPerception, HighlightPerception
from ..action import ICUAction

ICUFuelSensor = new_sensor('ICUFuelSensor', FuelTankPerception, PumpPerception,
                           EyeTrackerPerception, HighlightPerception)


class ICUFuelMind(ICUMind):

    LABELS = SimpleNamespace(highlight='highlight',
                             gaze='gaze',
                             saccade='saccade',
                             click='click',
                             burn='burn',
                             transfer='transfer',
                             change="change",
                             fuel='fuel',
                             repair='repair',
                             fail='fail')
Ejemplo n.º 4
0
__author__ = "Benedict Wilkins"
__email__ = "*****@*****.**"
__status__ = "Development"

from types import SimpleNamespace
from collections import defaultdict
import copy
import time

from pystarworlds.Agent import new_sensor

from .agent import ICUMind, ICUBody
from ..perception import TrackPerception, EyeTrackerPerception, HighlightPerception
from ..action import ICUAction

ICUTrackSensor = new_sensor('ICUTrackSensor', TrackPerception,
                            EyeTrackerPerception, HighlightPerception)


class ICUTrackMind(ICUMind):

    LABELS = SimpleNamespace(move='move',
                             key='key',
                             highlight='highlight',
                             gaze='gaze',
                             saccade='saccade')

    def __init__(self, config, window_properties):
        super(ICUTrackMind, self).__init__()

        # agents beliefs
        (x, y), (w, h) = window_properties['track'][