def hear_bark(do, hb): tt = dict(tt=0.7, ft=0.01) key = make_key(do, hb) if key in tt: return tt[key] key = make_key(do, not hb) return 1 - tt[key]
def dog_out(fo, bp, do): tt = dict(ttt=0.99, tft=0.9, ftt=0.97, fft=0.3) # Note typo in article! key = make_key(fo, bp, do) if key in tt: return tt[key] key = make_key(fo, bp, not do) return 1 - tt[key]
def hear_bark(do, hb): tt = dict( tt=0.7, ft=0.01) key = make_key(do, hb) if key in tt: return tt[key] key = make_key(do, not hb) return 1 - tt[key]
def dog_out(fo, bp, do): tt = dict( ttt=0.99, tft=0.9, ftt=0.97, fft=0.3) # Note typo in article! key = make_key(fo, bp, do) if key in tt: return tt[key] key = make_key(fo, bp, not do) return 1 - tt[key]
def f_rain(forecast, rain): table = dict() table['tt'] = 0.95 table['tf'] = 0.05 table['ft'] = 0.1 table['ff'] = 0.9 return table[make_key(forecast, rain)]
def f_h(e, g, h): tt = dict( ttt=0.05, ttf=0.95, tft=0.95, tff=0.05, ftt=0.95, ftf=0.05, fft=0.95, fff=0.05) return tt[make_key(e, g, h)]
def f_b(a, b): tt = dict( tt=0.5, ft=0.4, tf=0.5, ff=0.6) return tt[make_key(a, b)]
def f_c(a, c): tt = dict( tt=0.7, ft=0.2, tf=0.3, ff=0.8) return tt[make_key(a, c)]
def f_d(b, d): tt = dict( tt=0.9, ft=0.5, tf=0.1, ff=0.5) return tt[make_key(b, d)]
def f_e(c, e): tt = dict( tt=0.3, ft=0.6, tf=0.7, ff=0.4) return tt[make_key(c, e)]
def light_on(fo, lo): tt = dict( tt=0.6, tf=0.4, ft=0.05, ff=0.96) return tt[make_key(fo, lo)]
def f_f(d, e, f): tt = dict(ttt=0.01, ttf=0.99, tft=0.01, tff=0.99, ftt=0.01, ftf=0.99, fft=0.99, fff=0.01) return tt[make_key(d, e, f)]
def f_walk(forecast, rain, walk): table = dict() table['fff'] = 0.01 table['fft'] = 0.99 table['ftf'] = 0.99 table['ftt'] = 0.01 table['tff'] = 0.8 table['tft'] = 0.2 table['ttf'] = 0.999 table['ttt'] = 0.001 return table[make_key(forecast, rain, walk)]
def f_robot_action(self, informant_action, robot_belief, robot_action): table = dict() table['aaa'] = self.parameters["Yr"][0][0] table['aab'] = self.parameters["Yr"][0][1] table['aba'] = self.parameters["Yr"][1][0] table['abb'] = self.parameters["Yr"][1][1] table['baa'] = self.parameters["Yr"][2][0] table['bab'] = self.parameters["Yr"][2][1] table['bba'] = self.parameters["Yr"][3][0] table['bbb'] = self.parameters["Yr"][3][1] return table[make_key(informant_action, robot_belief, robot_action)]
def f_grass_wet(sprinkler, rain, grass_wet): table = dict() table['fft'] = 0.0 table['fff'] = 1.0 table['ftt'] = 0.8 table['ftf'] = 0.2 table['tft'] = 0.9 table['tff'] = 0.1 table['ttt'] = 0.99 table['ttf'] = 0.01 return table[make_key(sprinkler, rain, grass_wet)]
def f_f(d, e, f): tt = dict( ttt=0.01, ttf=0.99, tft=0.01, tff=0.99, ftt=0.01, ftf=0.99, fft=0.99, fff=0.01) return tt[make_key(d, e, f)]
def f_g(c, g): tt = dict(tt=0.8, tf=0.2, ft=0.1, ff=0.9) return tt[make_key(c, g)]
def light_on(fo, lo): tt = dict(tt=0.6, tf=0.4, ft=0.05, ff=0.96) return tt[make_key(fo, lo)]
def f_robot_expression(human_expression, human_action, object_size, robot_expression): table = dict() table['111h'] = 0.8 table['112h'] = 1.0 table['121h'] = 0.8 table['122h'] = 1.0 table['131h'] = 0.6 table['132h'] = 0.8 table['211h'] = 0.0 table['212h'] = 0.0 table['221h'] = 0.0 table['222h'] = 0.1 table['231h'] = 0.0 table['232h'] = 0.2 table['311h'] = 0.7 table['312h'] = 0.8 table['321h'] = 0.8 table['322h'] = 0.9 table['331h'] = 0.6 table['332h'] = 0.7 table['111s'] = 0.2 table['112s'] = 0.0 table['121s'] = 0.2 table['122s'] = 0.0 table['131s'] = 0.2 table['132s'] = 0.2 table['211s'] = 0.0 table['212s'] = 0.0 table['221s'] = 0.1 table['222s'] = 0.1 table['231s'] = 0.2 table['232s'] = 0.2 table['311s'] = 0.3 table['312s'] = 0.2 table['321s'] = 0.2 table['322s'] = 0.1 table['331s'] = 0.2 table['332s'] = 0.2 table['111n'] = 0.0 table['112n'] = 0.0 table['121n'] = 0.0 table['122n'] = 0.0 table['131n'] = 0.2 table['132n'] = 0.0 table['211n'] = 1.0 table['212n'] = 1.0 table['221n'] = 0.9 table['222n'] = 0.8 table['231n'] = 0.8 table['232n'] = 0.6 table['311n'] = 0.0 table['312n'] = 0.0 table['321n'] = 0.0 table['322n'] = 0.0 table['331n'] = 0.2 table['332n'] = 0.1 return table[make_key(human_expression, human_action, object_size, robot_expression)]
def f_g(c, g): tt = dict( tt=0.8, tf=0.2, ft=0.1, ff=0.9) return tt[make_key(c, g)]