Ejemplo n.º 1
0
def step_1(s):
    """Move the robot"""
    s.ui.filename = lvl_directory+"/level1"
    s = ui.load(s)
    s = ui.wild(s)
    s.ui.log_text = ""
    s.ui.story_text = """Neither bob nor the red robot can go through white rocks."""
    s.ui.obj_text = "Make the red robot go into the trap"
    return s
Ejemplo n.º 2
0
def step_1(s):
    """Move the robot"""
    s.ui.filename = lvl_directory+"/level2"
    s = ui.load(s)
    s = ui.wild(s)
    s.ui.log_text = ""
    s.ui.story_text = """This is slightly more challenging than the tutorial.
For a real challenge try to train bob with only two crystals."""
    s.ui.obj_text = "Make the red robot go into the trap"
    return s
Ejemplo n.º 3
0
def step_1(s):
    """Move the robot"""
    s.ui.filename = lvl_directory+"/level3"
    s = ui.load(s)
    s = ui.wild(s)
    s.ui.log_text = ""
    s.ui.story_text = """It is impossible to lose on that level. Try to win by
outsmarting the red robot,
and not by making it step through a long random walk."""
    s.ui.obj_text = "Make the red robot go into the trap"
    return s
Ejemplo n.º 4
0
def step_9(s):
    """Back to training"""
    s.ui.defeat = ui.defeat
    s.ui.vitcory = ui.victory
    s.ui.end_text = ""
    s.ui.active["retry"] = False
    s = ui.wild(s)
    s.ui.story_text = """Let's try again. The red robot trusts Bob.
That is because they share the same reward function.
The red robot thinks that if Bob has found a near-optimal policy
for resource collection, then it can copy that policy
and save itself the trouble of exploration.
Let's go back to the lab and teach Bob how to
follow a grassy path..."""
    s.ui.obj_text = """Click on the "Lab" button."""
    s.obj_func = lambda s: s.ui.terrain == ui.get_lab
    s.next_func = step_10
    g.BUTTONS["retry"][-1] = lambda: g._state(ui.retry)
    ui.checkpoint_now(s)
    return s
Ejemplo n.º 5
0
def wild(s):
    s = ui.wild(s)
    s.ui.active.update({k: True for k in ui.EDITOR_ACTIVE
                        if ui.EDITOR_ACTIVE[k]})
    s.ui.active["lab_go_wild"] = False
    return s