def __init__(self): shape1, shape2 = sg.sample_shape(2) objs1 = tg.Select(shape=shape1, when=sg.random_when()) objs2 = tg.Select(shape=shape2, when=sg.random_when()) a1 = tg.GetColor(objs1) a2 = tg.GetColor(objs2) self._operator = tg.IsSame(a1, a2)
def __init__(self): shape1, shape2, shape3, shape4 = sg.sample_shape(4) objs1 = tg.Select(shape=shape1, when=sg.random_when()) objs2 = tg.Select(shape=shape2, when=sg.random_when()) objs3 = tg.Select(shape=shape3, when=sg.random_when()) objs4 = tg.Select(shape=shape4, when=sg.random_when()) a1 = tg.GetColor(objs1) a2 = tg.GetColor(objs2) a3 = tg.GetColor(objs3) a4 = tg.GetColor(objs4) self._operator = tg.And(tg.IsSame(a1, a2), tg.IsSame(a3, a4))
def __init__(self): shape1, shape2, shape3 = sg.sample_shape(3) color1, color2 = sg.sample_color(2) when1 = sg.random_when() when2 = sg.random_when() objs1 = tg.Select(shape=shape1, when=when1) objs2 = tg.Select(shape=shape2, when=when2) a1 = tg.GetColor(objs1) a2 = tg.GetColor(objs2) bool1 = tg.IsSame(a1, a2) objs3 = tg.Select(color=color1, shape=shape3) objs4 = tg.Select(color=color2, shape=shape3) go1 = tg.Go(objs3) go2 = tg.Go(objs4) self._operator = tg.Switch(bool1, go1, go2, both_options_avail=True)
def __init__(self): shape1, shape2, shape3 = sg.sample_shape(3) objs1 = tg.Select(shape=shape1, when='latest') color1 = tg.GetColor(objs1) objs2 = tg.Select(color=color1, shape=shape2, when='now') self._operator = tg.Go(objs2) self._shape1, self._shape2, self._shape3 = shape1, shape2, shape3
def __init__(self): shape1, shape2 = sg.sample_shape(2) objs1 = tg.Select(shape=shape1, when=sg.random_when()) objs2 = tg.Select(shape=shape2, when=sg.random_when()) color11 = tg.GetColor(objs1) color21 = tg.GetColor(objs2) color12, color22 = sg.random_color(), sg.random_color() if random.random() > 0.5: bool1 = tg.IsSame(color11, color12) else: bool1 = tg.IsSame(color11, color12) if random.random() > 0.5: bool2 = tg.IsSame(color21, color22) else: bool2 = tg.IsSame(color21, color22) self._operator = tg.And(bool1, bool2)
def __init__(self): objs1 = tg.Select(shape=sg.random_shape(), when=sg.random_when()) a2 = sg.random_color() a1 = tg.GetColor(objs1) if random.random() > 0.5: self._operator = tg.IsSame(a1, a2) else: self._operator = tg.IsSame(a2, a1)
def __init__(self): shape1, shape2 = sg.sample_shape(2) objs1 = tg.Select(shape=shape1, when=sg.random_when()) loc = tg.GetLoc(objs1) objs2 = tg.Select(loc=loc, shape=shape2, when=sg.random_when(), space_type=sg.random_space()) self._operator = tg.GetColor(objs2)
def __init__(self): shape1, shape2 = sg.sample_shape(2) when1 = sg.random_when() a2 = sg.random_color() color1, color2 = sg.sample_color(2) objs1 = tg.Select(shape=shape1, when=when1) a1 = tg.GetColor(objs1) if random.random() > 0.5: bool1 = tg.IsSame(a1, a2) else: bool1 = tg.IsSame(a2, a1) objs2 = tg.Select(color=color1, shape=shape2) objs3 = tg.Select(color=color2, shape=shape2) go1 = tg.Go(objs2) go2 = tg.Go(objs3) self._operator = tg.Switch(bool1, go1, go2, both_options_avail=True)
def __init__(self): objs1 = tg.Select(when='now') color1 = tg.GetColor(objs1) shape1 = tg.GetShape(objs1) objs2 = tg.Select(color=color1, shape=shape1, when='last1') self._operator = tg.Exist(objs2)
def __init__(self): self._shape1 = sg.random_shape() objs1 = tg.Select(shape=self._shape1, when='now') color1 = tg.GetColor(objs1) objs2 = tg.Select(color=color1, shape=self._shape1, when='last1') self._operator = tg.Exist(objs2)
def __init__(self): shape1, shape2 = sg.sample_shape(2) objs1 = tg.Select(shape=shape1, when=sg.random_when()) color1 = tg.GetColor(objs1) objs2 = tg.Select(color=color1, shape=shape2, when='now') self._operator = tg.Exist(objs2)
def __init__(self): when = sg.random_when() shape = sg.random_shape() objs1 = tg.Select(shape=shape, when=when) self._operator = tg.GetColor(objs1)