Exemple #1
0
 def __init__(self):
     shape1, shape2, shape3 = sg.sample_shape(3)
     objs1 = tg.Select(shape=shape1, when='now')
     objs2 = tg.Select(shape=shape2, when='now')
     objs3 = tg.Select(shape=shape3, when=sg.random_when())
     bool1 = tg.And(tg.Exist(objs1), tg.Exist(objs2))
     self._operator = tg.Switch(bool1,
                                tg.Go(objs1),
                                tg.Go(objs3),
                                both_options_avail=False)
Exemple #2
0
 def __init__(self):
     color1, color2, color3 = sg.sample_color(3)
     objs1 = tg.Select(color=color1, when='now')
     objs2 = tg.Select(color=color2, when='now')
     objs3 = tg.Select(color=color3, when=sg.random_when())
     bool1 = tg.And(tg.Exist(objs1), tg.Exist(objs2))
     self._operator = tg.Switch(bool1,
                                tg.Go(objs1),
                                tg.Go(objs3),
                                both_options_avail=False)
Exemple #3
0
    def __init__(self):
        attr1, attr2, attr3 = sg.sample_colorshape(3)

        objs1 = tg.Select(color=attr1[0], shape=attr1[1], when='now')
        objs2 = tg.Select(color=attr2[0], shape=attr2[1], when='now')
        objs3 = tg.Select(color=attr3[0],
                          shape=attr3[1],
                          when=sg.random_when())
        bool1 = tg.And(tg.Exist(objs1), tg.Exist(objs2))
        self._operator = tg.Switch(bool1,
                                   tg.Go(objs1),
                                   tg.Go(objs3),
                                   both_options_avail=False)
Exemple #4
0
 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='now',
                       space_type=sg.random_space())
     self._operator = tg.Exist(objs2)
Exemple #5
0
 def __init__(self):
     color1, color2 = sg.sample_color(2)
     objs1 = tg.Select(color=color1, when=sg.random_when())
     loc = tg.GetLoc(objs1)
     objs2 = tg.Select(loc=loc,
                       color=color2,
                       when='now',
                       space_type=sg.random_space())
     self._operator = tg.Exist(objs2)
Exemple #6
0
    def __init__(self):
        attr1, attr2 = sg.sample_colorshape(2)
        when2 = sg.random_when()

        objs1 = tg.Select(color=attr1[0], shape=attr1[1], when='now')
        objs2 = tg.Select(color=attr2[0], shape=attr2[1], when=when2)
        self._operator = tg.Switch(tg.Exist(objs1),
                                   tg.Go(objs1),
                                   tg.Go(objs2),
                                   both_options_avail=False)
Exemple #7
0
 def __init__(self):
     attr1, attr2 = sg.sample_colorshape(2)
     objs1 = tg.Select(color=attr1[0],
                       shape=attr1[1],
                       when=sg.random_when())
     loc = tg.GetLoc(objs1)
     objs2 = tg.Select(loc=loc,
                       color=attr2[0],
                       shape=attr2[1],
                       when='now',
                       space_type=sg.random_space())
     self._operator = tg.Exist(objs2)
Exemple #8
0
    def __init__(self):
        shape1, shape2, shape3, shape4 = sg.sample_shape(4)
        objs1 = tg.Select(shape=shape1, when=sg.random_when())
        loc = tg.GetLoc(objs1)
        objs2 = tg.Select(loc=loc,
                          shape=shape2,
                          when='now',
                          space_type=sg.random_space())
        bool1 = tg.Exist(objs2)

        objs3 = tg.Select(shape=shape3)
        objs4 = tg.Select(shape=shape4)
        go1 = tg.Go(objs3)
        go2 = tg.Go(objs4)
        self._operator = tg.Switch(bool1, go1, go2, both_options_avail=True)
Exemple #9
0
    def __init__(self):
        color1, color2, color3, color4 = sg.sample_color(4)
        objs1 = tg.Select(color=color1, when=sg.random_when())
        loc = tg.GetLoc(objs1)
        objs2 = tg.Select(loc=loc,
                          color=color2,
                          when='now',
                          space_type=sg.random_space())
        bool1 = tg.Exist(objs2)

        objs3 = tg.Select(color=color3)
        objs4 = tg.Select(color=color4)
        go1 = tg.Go(objs3)
        go2 = tg.Go(objs4)
        self._operator = tg.Switch(bool1, go1, go2, both_options_avail=True)
Exemple #10
0
    def __init__(self):
        attr1, attr2, attr3, attr4 = sg.sample_colorshape(4)
        objs1 = tg.Select(color=attr1[0],
                          shape=attr1[1],
                          when=sg.random_when())
        loc = tg.GetLoc(objs1)
        objs2 = tg.Select(loc=loc,
                          color=attr2[0],
                          shape=attr2[1],
                          when='now',
                          space_type=sg.random_space())
        bool1 = tg.Exist(objs2)

        objs3 = tg.Select(color=attr3[0], shape=attr3[1])
        objs4 = tg.Select(color=attr4[0], shape=attr4[1])
        go1 = tg.Go(objs3)
        go2 = tg.Go(objs4)
        self._operator = tg.Switch(bool1, go1, go2, both_options_avail=True)
Exemple #11
0
 def __init__(self):
     color1, color2 = sg.sample_color(2)
     objs1 = tg.Select(color=color1, when=sg.random_when())
     shape1 = tg.GetShape(objs1)
     objs2 = tg.Select(color=color2, shape=shape1, when='now')
     self._operator = tg.Exist(objs2)
Exemple #12
0
 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)
Exemple #13
0
 def __init__(self):
     objs1 = tg.Select(shape=sg.random_shape(), when='now')
     self._operator = tg.Exist(objs1)
Exemple #14
0
 def __init__(self):
     attr1 = sg.random_colorshape()
     objs1 = tg.Select(color=attr1[0], shape=attr1[1], when='now')
     task = tg.Exist(objs1)
     self._operator = task
Exemple #15
0
 def __init__(self):
     self._color1 = sg.random_color()
     objs1 = tg.Select(color=self._color1, when='now')
     shape1 = tg.GetShape(objs1)
     objs2 = tg.Select(color=self._color1, shape=shape1, when='last1')
     self._operator = tg.Exist(objs2)
Exemple #16
0
 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)
Exemple #17
0
 def __init__(self):
     objs1 = tg.Select(color=sg.random_color(), when='now')
     self._operator = tg.Exist(objs1)