---------------------------- Object type: player ----------------------------
Expert #1 for obj_type player with weight = 1.58
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-3])
break
return obj_list
Expert #2 for obj_type player with weight = 0.53
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = SeqValues([-2, -3, -3, -3, -3, -3, -2])
break
return obj_list
Expert #3 for obj_type player with weight = 0.64
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = SeqValues([-6, -7, -4, 0, 2, 6, 9])
break
return obj_list
Expert #4 for obj_type player with weight = 0.43
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for player_obj in player_objs:
for barrier_obj in barrier_objs:
if player_obj.touches(barrier_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #5 for obj_type player with weight = 0.85
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for barrier_obj in barrier_objs:
if player_obj.touches(barrier_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #6 for obj_type player with weight = 1.60
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for player_obj in player_objs:
for barrier_obj in barrier_objs:
if player_obj.touches(barrier_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #7 for obj_type player with weight = 1.03
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #8 for obj_type player with weight = 0.90
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = SeqValues([2, 3, 3, 3, 3, 3, 2])
break
return obj_list
Expert #9 for obj_type player with weight = 0.73
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = SeqValues([-6, -7, -4, 0, 2, 6, 9])
break
return obj_list
Expert #10 for obj_type player with weight = 1.06
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=0.8) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for player_obj in player_objs:
for barrier_obj in barrier_objs:
if player_obj.touches(barrier_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #11 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to -6.
player_obj.velocity_y = RandomValues([-6])
return obj_list
Expert #12 for obj_type player with weight = 0.75
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([11])
break
return obj_list
Expert #13 for obj_type player with weight = 0.81
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # iterate over each player object
for platform_obj in platform_objs: # iterate over each platform object
if player_obj.touches(platform_obj, touch_side, touch_percent): # check if player object touches platform object
# Set the center_y of the player object to the new_center_y of the platform object
player_obj.center_y = RandomValues([platform_obj.new_center_y])
break # break to ensure we only set the center_y once per player object
return obj_list
Expert #14 for obj_type player with weight = 0.72
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs: # ladder_obj is of type Obj
if player_obj.touches(ladder_obj, touch_side, touch_percent): # check if player_obj touches ladder_obj
# Set the center_x position of the player_obj to the new_center_x of the ladder_obj
player_obj.center_x = RandomValues([ladder_obj.new_center_x])
break # Avoid setting the attribute more than once
return obj_list
Expert #15 for obj_type player with weight = 0.81
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([3])
break
return obj_list
Expert #16 for obj_type player with weight = 1.41
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-3])
break
return obj_list
Expert #17 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent) and player_obj.velocity_y < 0:
player_obj.velocity_y = RandomValues([player_obj.velocity_y, -player_obj.velocity_y])
break
return obj_list
Expert #18 for obj_type player with weight = 0.88
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs: # ladder_obj is of type Obj
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set the center_x position of the player object to the new_center_x of the ladder object
player_obj.center_x = RandomValues([ladder_obj.new_center_x])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #19 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-2])
break
return obj_list
Expert #20 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-2])
break
return obj_list
Expert #21 for obj_type player with weight = 0.49
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-2])
break
return obj_list
Expert #22 for obj_type player with weight = 0.96
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.bottom_side = RandomValues([ladder_obj.new_top_side])
break
return obj_list
Expert #23 for obj_type player with weight = 0.36
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #24 for obj_type player with weight = 0.38
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.7000000000000001) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #25 for obj_type player with weight = 0.62
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([5])
break
return obj_list
Expert #26 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #27 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #28 for obj_type player with weight = 0.63
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #29 for obj_type player with weight = 0.43
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.6) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #30 for obj_type player with weight = 0.24
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #31 for obj_type player with weight = 0.40
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=0.8) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #32 for obj_type player with weight = 0.82
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=0.8) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #33 for obj_type player with weight = 0.40
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=0.8) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #34 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #35 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #36 for obj_type player with weight = 0.51
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.center_x = RandomValues([ladder_obj.new_center_x])
break # Avoid setting the center_x more than once for each player object
return obj_list
Expert #37 for obj_type player with weight = 0.62
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #38 for obj_type player with weight = 0.31
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-5])
break
return obj_list
Expert #39 for obj_type player with weight = 0.20
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-4])
break
return obj_list
Expert #40 for obj_type player with weight = 0.25
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-4])
break
return obj_list
Expert #41 for obj_type player with weight = 0.31
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyor_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for conveyor_belt in conveyor_belts:
if player_obj.touches(conveyor_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-4])
break
return obj_list
Expert #42 for obj_type player with weight = 0.16
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-5])
break
return obj_list
Expert #43 for obj_type player with weight = 0.65
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-5])
break
return obj_list
Expert #44 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent): # check if player_obj touches platform_obj
# Set the bottom_side of player_obj to the new_top_side of platform_obj
player_obj.bottom_side = RandomValues([platform_obj.new_top_side])
break # Avoid setting the attribute more than once
return obj_list
Expert #45 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_y = RandomValues([0])
return obj_list
Expert #46 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_y = RandomValues([0])
return obj_list
Expert #47 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([player_obj.velocity_y + 2])
return obj_list
Expert #48 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([2])
return obj_list
Expert #49 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_x = RandomValues([3]) # Set x-axis velocity to +3
return obj_list
Expert #50 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #51 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent) and player_obj.velocity_y > 0:
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #52 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent) and player_obj.velocity_y > 0:
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #53 for obj_type player with weight = 0.89
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.center_x = RandomValues([rope_obj.new_center_x])
break
return obj_list
Expert #54 for obj_type player with weight = 1.01
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = SeqValues([1, 3, 3])
break
return obj_list
Expert #55 for obj_type player with weight = 0.55
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = SeqValues([-6, -7, -4])
break
return obj_list
Expert #56 for obj_type player with weight = 0.92
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #57 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to 3.
player_obj.velocity_y = RandomValues([3])
return obj_list
Expert #58 for obj_type player with weight = 0.81
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([3])
break
return obj_list
Expert #59 for obj_type player with weight = 0.94
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-3])
break
return obj_list
Expert #60 for obj_type player with weight = 0.21
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 2, player_obj.velocity_x - 2])
break
return obj_list
Expert #61 for obj_type player with weight = 0.78
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #62 for obj_type player with weight = 0.52
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #63 for obj_type player with weight = 0.31
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.7000000000000001) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #64 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.7000000000000001) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-7])
break
return obj_list
Expert #65 for obj_type player with weight = 0.12
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.7000000000000001) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Set the x-axis velocity to +3.
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #66 for obj_type player with weight = 0.03
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.7000000000000001) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Set the y-axis velocity to -7.
player_obj.velocity_y = RandomValues([-7])
break
return obj_list
Expert #67 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_x = RandomValues([3])
return obj_list
Expert #68 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.7000000000000001) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-7])
break
return obj_list
Expert #69 for obj_type player with weight = 0.32
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.7000000000000001) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #70 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_x = RandomValues([2])
return obj_list
Expert #71 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_x = RandomValues([2])
return obj_list
Expert #72 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #73 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #74 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to -6.
player_obj.velocity_y = RandomValues([-6])
return obj_list
Expert #75 for obj_type player with weight = 0.67
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'FIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #76 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to -7.
player_obj.velocity_y = RandomValues([-7])
return obj_list
Expert #77 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
if player_obj.velocity_y < 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([-7])
return obj_list
Expert #78 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
if player_obj.velocity_y < 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([0])
return obj_list
Expert #79 for obj_type player with weight = 0.23
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
if player_obj.velocity_y == 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([2])
return obj_list
Expert #80 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #81 for obj_type player with weight = 0.41
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != player_obj):
# Increase the y-axis velocity by +4.
player_obj.velocity_y = RandomValues([player_obj.velocity_y + 4])
return obj_list
Expert #82 for obj_type player with weight = 0.32
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Check if the player object is not touching anything
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != player_obj):
# If the y-axis velocity is positive, set it to +6
if player_obj.velocity_y > 0:
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #83 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
interaction = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([9])
return obj_list
Expert #84 for obj_type player with weight = 0.58
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if not any(player_obj.touches(obj, touch_side, touch_percent) for obj in obj_list.objs):
player_obj.velocity_y = RandomValues([player_obj.velocity_y + 3]) # Increase y-axis velocity by +3
return obj_list
Expert #85 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
player_obj.deleted = RandomValues([0])
return obj_list
Expert #86 for obj_type player with weight = 0.96
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #87 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-8])
break
return obj_list
Expert #88 for obj_type player with weight = 0.37
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2])
break
return obj_list
Expert #89 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.deleted = RandomValues([0]) # Ensure player objects are not deleted
return obj_list
Expert #90 for obj_type player with weight = 0.46
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #91 for obj_type player with weight = 0.47
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #92 for obj_type player with weight = 0.57
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([3])
break
return obj_list
Expert #93 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x, abs(player_obj.velocity_x)])
break
return obj_list
Expert #94 for obj_type player with weight = 0.43
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.center_x = RandomValues([ladder_obj.new_center_x])
break # Avoid setting the center_x more than once for each player object
return obj_list
Expert #95 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #96 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2, player_obj.velocity_y])
break
return obj_list
Expert #97 for obj_type player with weight = 0.40
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-4])
break
return obj_list
Expert #98 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2])
break
return obj_list
Expert #99 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-4])
break
return obj_list
Expert #100 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2])
break
return obj_list
Expert #101 for obj_type player with weight = 0.40
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
rope_objs = obj_list.get_objs_by_obj_type('rope') # get all Obj of type 'rope'
for player_obj in player_objs: # player_obj is of type Obj
for rope_obj in rope_objs: # rope_obj is of type Obj
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Set the center_x position of the player object to the new_center_x of the rope object
player_obj.center_x = RandomValues([rope_obj.new_center_x])
break # Avoid setting the attribute more than once
return obj_list
Expert #102 for obj_type player with weight = 0.12
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Ensure player objects are not deleted by setting deleted to 0
player_obj.deleted = RandomValues([0])
return obj_list
Expert #103 for obj_type player with weight = 0.12
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Set y-axis velocity to any value except +2
player_obj.velocity_y = RandomValues([v for v in range(-10, 11) if v != 2])
break
return obj_list
Expert #104 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y, 0])
break
return obj_list
Expert #105 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #106 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Do not change y-axis velocity
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #107 for obj_type player with weight = 0.41
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 2, player_obj.velocity_x - 2])
break
return obj_list
Expert #108 for obj_type player with weight = 0.77
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #109 for obj_type player with weight = 0.33
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #110 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to -3.
player_obj.velocity_x = RandomValues([-3])
return obj_list
Expert #111 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-3])
break
return obj_list
Expert #112 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-7])
break
return obj_list
Expert #113 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-3])
break
return obj_list
Expert #114 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-7])
break
return obj_list
Expert #115 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to -3.
player_obj.velocity_x = RandomValues([-3])
return obj_list
Expert #116 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_x = RandomValues([-3])
return obj_list
Expert #117 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
# Ensure the x-axis velocity remains negative
player_obj.velocity_x = RandomValues([v for v in range(-10, 0)]) # Example range of negative values
return obj_list
Expert #118 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
# Adjust y-axis velocity to -4
player_obj.velocity_y = RandomValues([-4])
return obj_list
Expert #119 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
# Set y-axis velocity to -4
player_obj.velocity_y = RandomValues([-4])
return obj_list
Expert #120 for obj_type player with weight = 0.39
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of obj_type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #121 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to +2.
player_obj.velocity_y = RandomValues([2])
return obj_list
Expert #122 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([13])
return obj_list
Expert #123 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Check if the player object is not touching any other object.
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != player_obj):
# Increase y-axis velocity by +7.
player_obj.velocity_y = RandomValues([player_obj.velocity_y + 7])
return obj_list
Expert #124 for obj_type player with weight = 0.37
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #125 for obj_type player with weight = 0.27
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #126 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set the bottom_side of the player_obj to be equal to the new_top_side of the platform_obj
player_obj.bottom_side = RandomValues([platform_obj.new_top_side])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #127 for obj_type player with weight = 0.42
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #128 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #129 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platforms = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #130 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.6) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #131 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 1, player_obj.velocity_x + 2])
break
return obj_list
Expert #132 for obj_type player with weight = 0.22
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #133 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to -2.
player_obj.velocity_x = RandomValues([-2])
return obj_list
Expert #134 for obj_type player with weight = 0.64
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-8])
break
return obj_list
Expert #135 for obj_type player with weight = 0.47
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.6) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-8])
break
return obj_list
Expert #136 for obj_type player with weight = 0.59
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-8])
break
return obj_list
Expert #137 for obj_type player with weight = 0.39
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs: # ladder_obj is of type Obj
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set the center_x position of the player object to the new_center_x of the ladder object
player_obj.center_x = RandomValues([ladder_obj.new_center_x])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #138 for obj_type player with weight = 0.12
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to 6.
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #139 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #140 for obj_type player with weight = 0.67
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #141 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.2) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #142 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.2) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #143 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set x-axis velocity to 0 when touching a platform.
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #144 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y, abs(player_obj.velocity_y)])
break
return obj_list
Expert #145 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #146 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of obj_type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #147 for obj_type player with weight = 0.20
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([7])
break
return obj_list
Expert #148 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=0.8) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #149 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #150 for obj_type player with weight = 0.62
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.6) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #151 for obj_type player with weight = 0.60
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #152 for obj_type player with weight = 0.21
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #153 for obj_type player with weight = 0.21
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt') # get all Obj of type 'conveyer_belt'
for player_obj in player_objs: # player_obj is of type Obj
for conveyer_belt_obj in conveyer_belt_objs:
if player_obj.touches(conveyer_belt_obj, touch_side, touch_percent):
# Set the player's bottom_side to the conveyer_belt's new_top_side
player_obj.bottom_side = RandomValues([conveyer_belt_obj.new_top_side])
break # Avoid setting the attribute more than once
return obj_list
Expert #154 for obj_type player with weight = 0.36
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([4])
break
return obj_list
Expert #155 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #156 for obj_type player with weight = 0.16
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.deleted = RandomValues([0])
return obj_list
Expert #157 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=0.4) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #158 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.4) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the y-axis velocity to its current value, indicating no change.
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #159 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.4) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the y-axis velocity to 6.
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #160 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.4) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for obj in obj_list.objs:
if obj.obj_type == 'conveyer_belt' and player_obj.touches(obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y, abs(player_obj.velocity_y)])
break
return obj_list
Expert #161 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.2) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #162 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the y-axis velocity to its current value, indicating no change.
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #163 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the y-axis velocity to 6.
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #164 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for obj in obj_list.objs:
if obj.obj_type == 'conveyer_belt' and player_obj.touches(obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y, abs(player_obj.velocity_y)])
break
return obj_list
Expert #165 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #166 for obj_type player with weight = 0.63
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x == 0:
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
break
else:
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #167 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #168 for obj_type player with weight = 0.23
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_y = RandomValues([4])
return obj_list
Expert #169 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if not any(player_obj.touches(obj, touch_side, touch_percent) for obj in obj_list.objs):
# Decrease y-axis velocity by 2
player_obj.velocity_y = RandomValues([player_obj.velocity_y - 2])
return obj_list
Expert #170 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([4])
return obj_list
Expert #171 for obj_type player with weight = 0.50
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2])
break
return obj_list
Expert #172 for obj_type player with weight = 0.33
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.1) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 2, player_obj.velocity_x - 2])
break
return obj_list
Expert #173 for obj_type player with weight = 0.22
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #174 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
return sum(1 for vy in obj.history['velocity_y'][-5:] if vy == 6)
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 3:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #175 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
history_y = obj.history['velocity_y'][-5:]
return sum(1 for i in range(len(history_y) - 1) if history_y[i] == 6 and history_y[i + 1] == 4)
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #176 for obj_type player with weight = 0.24
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
player_obj.deleted = RandomValues([0])
return obj_list
Expert #177 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #178 for obj_type player with weight = 0.59
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x])
break
return obj_list
Expert #179 for obj_type player with weight = 0.12
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y, abs(player_obj.velocity_y)])
break
return obj_list
Expert #180 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #181 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([5])
return obj_list
Expert #182 for obj_type player with weight = 0.82
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
return sum(1 for vx in obj.history['velocity_x'][-5:] if vx == 0)
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
danger_attribute = compute_danger_attribute(player_obj)
if danger_attribute > 4:
for conveyer_belt_obj in conveyer_belt_objs:
if player_obj.touches(conveyer_belt_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #183 for obj_type player with weight = 0.82
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
return sum(1 for vy in obj.history['velocity_y'][-5:] if vy == 6)
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 3:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #184 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.1) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = SeqValues([6, 6, 6, 5])
break
return obj_list
Expert #185 for obj_type player with weight = 0.57
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #186 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set y-axis velocity to 6 when touching a ladder.
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #187 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set y-axis velocity to +6.
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #188 for obj_type player with weight = 0.22
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set the y-axis velocity to 7.
player_obj.velocity_y = RandomValues([7])
break
return obj_list
Expert #189 for obj_type player with weight = 0.32
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent) and player_obj.velocity_y > 0:
player_obj.velocity_y = RandomValues([player_obj.velocity_y + 1])
break
return obj_list
Expert #190 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([11])
break
return obj_list
Expert #191 for obj_type player with weight = 0.03
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to -2.
player_obj.velocity_x = RandomValues([-2])
return obj_list
Expert #192 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.6) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #193 for obj_type player with weight = 0.61
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #194 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #195 for obj_type player with weight = 0.22
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-1])
break
return obj_list
Expert #196 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set the bottom_side position of the player_obj to be equal to the new_top_side position of the platform_obj
player_obj.bottom_side = RandomValues([platform_obj.new_top_side])
break # Avoid setting the attribute value more than once for each player object
return obj_list
Expert #197 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #198 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.1) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set the bottom_side of the player_obj to the new_top_side of the platform_obj
player_obj.bottom_side = RandomValues([platform_obj.new_top_side])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #199 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.1) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
conveyor_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyor_belt in conveyor_belts:
if player_obj.touches(conveyor_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #200 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.1) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt') # get all Obj of type 'conveyer_belt'
for player_obj in player_objs: # player_obj is of type Obj
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the bottom_side of the player_obj to the new_top_side of the conveyer_belt
player_obj.bottom_side = RandomValues([conveyer_belt.new_top_side])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #201 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the deleted attribute to 0, indicating the player object is not deleted.
player_obj.deleted = RandomValues([0])
return obj_list
Expert #202 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #203 for obj_type player with weight = 0.36
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.7000000000000001) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #204 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.7000000000000001) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #205 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the y-axis velocity to -6.
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #206 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent) and player_obj.velocity_y == 0:
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #207 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to -7.
player_obj.velocity_y = RandomValues([-7])
return obj_list
Expert #208 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything and player_obj.velocity_y < 0:
player_obj.velocity_y = RandomValues([-7])
return obj_list
Expert #209 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything and player_obj.velocity_x > 0:
player_obj.velocity_x = RandomValues([3])
return obj_list
Expert #210 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to +3.
player_obj.velocity_y = RandomValues([3])
return obj_list
Expert #211 for obj_type player with weight = 0.48
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([3])
break
return obj_list
Expert #212 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Reduce the y-axis velocity by 3.
player_obj.velocity_y = RandomValues([player_obj.velocity_y - 3])
break
return obj_list
Expert #213 for obj_type player with weight = 0.36
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent) and player_obj.velocity_y > 0:
player_obj.velocity_y = RandomValues([abs(player_obj.velocity_y)])
break
return obj_list
Expert #214 for obj_type player with weight = 0.32
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 2])
break
return obj_list
Expert #215 for obj_type player with weight = 0.39
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent) and player_obj.velocity_y < 0:
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #216 for obj_type player with weight = 0.31
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to +2.
player_obj.velocity_y = RandomValues([2])
return obj_list
Expert #217 for obj_type player with weight = 0.60
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([1, 2])
break
return obj_list
Expert #218 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to +6.
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #219 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #220 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([9])
return obj_list
Expert #221 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to 0.
player_obj.velocity_y = RandomValues([0])
return obj_list
Expert #222 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #223 for obj_type player with weight = 0.03
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #224 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs: # ladder_obj is of type Obj
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set the center_x position of the player object to the new_center_x of the ladder object
player_obj.center_x = RandomValues([ladder_obj.new_center_x])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #225 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to 0.
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #226 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([3])
break
return obj_list
Expert #227 for obj_type player with weight = 0.32
def alter_player_objects(obj_list: ObjList, action: str, touch_side=1, touch_percent=1.0) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([3])
break
return obj_list
Expert #228 for obj_type player with weight = 0.24
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
# Set x-axis velocity to 0 when touching a wall.
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #229 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
wall_objs = obj_list.get_objs_by_obj_type('wall')
for player_obj in player_objs:
for wall_obj in wall_objs:
if player_obj.touches(wall_obj, touch_side, touch_percent):
# Set y-axis velocity to 3 when touching a wall.
player_obj.velocity_y = RandomValues([3])
break
return obj_list
Expert #230 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #231 for obj_type player with weight = 0.40
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the deleted attribute to 0, indicating the player object is not deleted.
player_obj.deleted = RandomValues([0])
return obj_list
Expert #232 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set the x-axis velocity to -3 if touching a platform.
player_obj.velocity_x = RandomValues([-3])
break
return obj_list
Expert #233 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent): # check if player_obj touches platform_obj
# Set the bottom_side of player_obj to the new_top_side of platform_obj
player_obj.bottom_side = RandomValues([platform_obj.new_top_side])
break # Avoid setting the attribute more than once
return obj_list
Expert #234 for obj_type player with weight = 0.54
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_x is consistently -3 over the latest 5 timesteps
if obj.history['velocity_x'][-5:] == [-3, -3, -3, -3, -3]:
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
danger_attribute = compute_danger_attribute(player_obj)
if danger_attribute > -1:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #235 for obj_type player with weight = 0.54
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_y suddenly drops to -6 in the latest timestep
if obj.history['velocity_y'][-1] == -6:
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 0:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #236 for obj_type player with weight = 0.54
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_y is consistently 0 over the latest 5 timesteps
if obj.history['velocity_y'][-5:] == [0, 0, 0, 0, 0]:
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
danger_attribute = compute_danger_attribute(player_obj)
if danger_attribute > -1:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #237 for obj_type player with weight = 0.54
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_x is consistently near zero (-1, 0, or 1) over the latest 5 timesteps
if all(v in [-1, 0, 1] for v in obj.history['velocity_x'][-5:]):
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > -1:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #238 for obj_type player with weight = 0.54
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
player_obj.deleted = RandomValues([1])
break
return obj_list
Expert #239 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Maintain current x-axis velocity
player_obj.velocity_x = RandomValues([player_obj.velocity_x])
break
return obj_list
Expert #240 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x]) # Maintain current x-axis velocity
break
return obj_list
Expert #241 for obj_type player with weight = 0.27
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([5])
break
return obj_list
Expert #242 for obj_type player with weight = 0.12
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.7000000000000001) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #243 for obj_type player with weight = 0.24
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.7000000000000001) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #244 for obj_type player with weight = 0.58
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #245 for obj_type player with weight = 0.25
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #246 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #247 for obj_type player with weight = 0.24
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #248 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #249 for obj_type player with weight = 0.47
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=0.8) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #250 for obj_type player with weight = 0.07
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #251 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladders = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for ladder in ladders:
if player_obj.touches(ladder, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #252 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platforms = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
for platform in platforms:
if player_obj.touches(platform, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([1])
break
return obj_list
Expert #253 for obj_type player with weight = 0.32
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to +1.
player_obj.velocity_x = RandomValues([1])
return obj_list
Expert #254 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.6) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 1, player_obj.velocity_x + 2])
break
return obj_list
Expert #255 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.6) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2]) # Set x-axis velocity to +2
break
return obj_list
Expert #256 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.6) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([2])
break
return obj_list
Expert #257 for obj_type player with weight = 0.46
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 1, player_obj.velocity_x + 2])
break
return obj_list
Expert #258 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.2) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #259 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.2) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt') # get all Obj of type 'conveyer_belt'
for player_obj in player_objs: # player_obj is of type Obj
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
# Set the bottom_side of the player_obj to the new_top_side of the conveyer_belt
player_obj.bottom_side = RandomValues([conveyer_belt.new_top_side])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #260 for obj_type player with weight = 0.67
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt_obj in conveyer_belt_objs:
if player_obj.touches(conveyer_belt_obj, touch_side, touch_percent):
# Reduce the x-axis velocity by 1.
player_obj.velocity_x = RandomValues([player_obj.velocity_x - 1])
break
return obj_list
Expert #261 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt_obj in conveyer_belt_objs:
if player_obj.touches(conveyer_belt_obj, touch_side, touch_percent):
# Set the y-axis velocity to +0.
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #262 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent) and conveyer_belt.velocity_y == 0:
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #263 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
touching_anything = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_y = RandomValues([-7])
return obj_list
Expert #264 for obj_type player with weight = 0.37
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x > 0:
touching_anything = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_x = RandomValues([3])
return obj_list
Expert #265 for obj_type player with weight = 0.74
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'RIGHTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction_found = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction_found = True
break
if not interaction_found:
player_obj.velocity_x = RandomValues([5])
return obj_list
Expert #266 for obj_type player with weight = 0.51
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.deleted = RandomValues([0]) # Ensure player objects are not deleted
return obj_list
Expert #267 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_y = RandomValues([-4])
return obj_list
Expert #268 for obj_type player with weight = 0.16
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to +2.
player_obj.velocity_x = RandomValues([2])
return obj_list
Expert #269 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
if player_obj.velocity_x > 0:
touching = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([9])
return obj_list
Expert #270 for obj_type player with weight = 0.25
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
if player_obj.velocity_y > 0:
touching = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_x = RandomValues([2])
return obj_list
Expert #271 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-4])
break
return obj_list
Expert #272 for obj_type player with weight = 0.23
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-4])
break
return obj_list
Expert #273 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-4])
break
return obj_list
Expert #274 for obj_type player with weight = 0.28
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.8) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-4])
break
return obj_list
Expert #275 for obj_type player with weight = 0.22
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of obj_type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #276 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Maintain x-axis velocity.
player_obj.velocity_x = RandomValues([player_obj.velocity_x])
break
return obj_list
Expert #277 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2])
break
return obj_list
Expert #278 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x]) # No change
break
return obj_list
Expert #279 for obj_type player with weight = 0.38
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_x = RandomValues([1])
return obj_list
Expert #280 for obj_type player with weight = 0.26
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([8])
return obj_list
Expert #281 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
if player_obj.velocity_y > 0:
touching_anything = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_y = RandomValues([8])
return obj_list
Expert #282 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the y-axis velocity to +9.
player_obj.velocity_y = RandomValues([9])
return obj_list
Expert #283 for obj_type player with weight = 0.16
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_x = RandomValues([player_obj.velocity_x, -2])
return obj_list
Expert #284 for obj_type player with weight = 0.16
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y, 9])
break
return obj_list
Expert #285 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
touching = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_x = RandomValues([-2])
return obj_list
Expert #286 for obj_type player with weight = 0.71
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #287 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.5) -> ObjList:
if action == 'LEFTFIRE':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #288 for obj_type player with weight = 0.42
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set the y-axis velocity to -6 if the player object touches a platform.
player_obj.velocity_y = RandomValues([-6])
break
return obj_list
Expert #289 for obj_type player with weight = 0.41
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_x = RandomValues([-3])
return obj_list
Expert #290 for obj_type player with weight = 0.18
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y < 0:
touching = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([-7])
return obj_list
Expert #291 for obj_type player with weight = 0.22
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set y-axis velocity to 0 if touching a platform.
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #292 for obj_type player with weight = 0.37
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if isinstance(player_obj.velocity_x, int) and player_obj.velocity_x < 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #293 for obj_type player with weight = 0.29
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if isinstance(player_obj.velocity_y, int) and player_obj.velocity_y > 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #294 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to -5.
player_obj.velocity_x = RandomValues([-5])
return obj_list
Expert #295 for obj_type player with weight = 0.29
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-5])
break
return obj_list
Expert #296 for obj_type player with weight = 0.94
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #297 for obj_type player with weight = 0.14
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_x < 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-5])
break
return obj_list
Expert #298 for obj_type player with weight = 0.29
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.center_x = RandomValues([rope_obj.new_center_x])
break
return obj_list
Expert #299 for obj_type player with weight = 0.41
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
# Set x-axis velocity to +0
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #300 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_y = RandomValues([4])
return obj_list
Expert #301 for obj_type player with weight = 0.35
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
if player_obj.velocity_y > 0:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([4])
break
return obj_list
Expert #302 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs):
player_obj.velocity_x = RandomValues([0]) # Set x-axis velocity to +0
return obj_list
Expert #303 for obj_type player with weight = 0.03
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #304 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #305 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != player_obj):
player_obj.velocity_x = RandomValues([0]) # Set x-axis velocity to +0
return obj_list
Expert #306 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #307 for obj_type player with weight = 0.59
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
count = 0
for vx in obj.history['velocity_x'][-5:]:
if vx == 0:
count += 1
return count
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
danger = compute_danger_attribute(player_obj)
if danger > 4:
player_obj.deleted = RandomValues([1]) # Set deleted to 1
return obj_list
Expert #308 for obj_type player with weight = 0.64
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
count = 0
for vy in obj.history['velocity_y'][-5:]:
if vy == 6:
count += 1
return count
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
danger = compute_danger_attribute(player_obj)
if danger > 2:
player_obj.deleted = RandomValues([1])
return obj_list
Expert #309 for obj_type player with weight = 0.79
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
count = 0
for vy in obj.history['velocity_y'][-5:]:
if vy == 4:
count += 1
return count
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
danger = compute_danger_attribute(player_obj)
if danger > 0:
player_obj.deleted = RandomValues([1])
return obj_list
Expert #310 for obj_type player with weight = 0.17
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
touching = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_x = RandomValues([player_obj.velocity_x + 1, player_obj.velocity_x - 1])
break
return obj_list
Expert #311 for obj_type player with weight = 0.10
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
for player_obj in player_objs: # player_obj is of type Obj
touching = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
touching = True
break
if not touching:
player_obj.velocity_y = RandomValues([player_obj.velocity_y + 1, player_obj.velocity_y - 1])
break
return obj_list
Expert #312 for obj_type player with weight = 0.13
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.deleted = SeqValues([0, 0, 0])
break
return obj_list
Expert #313 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player')
rope_objs = obj_list.get_objs_by_obj_type('rope')
for player_obj in player_objs:
for rope_obj in rope_objs:
if player_obj.touches(rope_obj, touch_side, touch_percent):
player_obj.velocity_y = SeqValues([4, 6, 6])
break
return obj_list
Expert #314 for obj_type player with weight = 0.21
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #315 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set x-axis velocity to 0 if touching a ladder.
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #316 for obj_type player with weight = 0.20
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set y-axis velocity to 0 if touching a platform.
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #317 for obj_type player with weight = 0.21
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
if action == 'NOOP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set the bottom_side of the player_obj to be equal to the new_top_side of the platform_obj
player_obj.bottom_side = RandomValues([platform_obj.new_top_side])
break # Avoid setting the attribute more than once for each player object
return obj_list
Expert #318 for obj_type player with weight = 0.34
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #319 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([-2])
break
return obj_list
Expert #320 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if player_obj.velocity_y == 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([2])
break
return obj_list
Expert #321 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, action: str, touch_side=3, touch_percent=0.1) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #322 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set x-axis velocity to +0.
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #323 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
# Set y-axis velocity to +6.
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #324 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #325 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #326 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Set the x-axis velocity to 0.
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #327 for obj_type player with weight = 0.20
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #328 for obj_type player with weight = 0.01
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #329 for obj_type player with weight = 0.01
def alter_player_objects(obj_list: ObjList, _, touch_side=1, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent) and player_obj.velocity_y > 0:
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #330 for obj_type player with weight = 0.09
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.1) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of obj_type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #331 for obj_type player with weight = 0.33
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x])
break
return obj_list
Expert #332 for obj_type player with weight = 0.20
def alter_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([6])
break
return obj_list
Expert #333 for obj_type player with weight = 0.19
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'DOWN':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
for player_obj in player_objs: # player_obj is of type Obj
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([6])
return obj_list
Expert #334 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #335 for obj_type player with weight = 0.38
def alter_player_objects(obj_list: ObjList, action: str, touch_side=-1, touch_percent=0.1) -> ObjList:
if action == 'RIGHT':
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
interaction = False
for other_obj in obj_list.objs:
if player_obj.touches(other_obj, touch_side, touch_percent):
interaction = True
break
if not interaction:
player_obj.velocity_y = RandomValues([5])
return obj_list
Expert #336 for obj_type player with weight = 0.48
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Check if the player object is not touching any other object.
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != player_obj):
# Decrease y-axis velocity by 1.
player_obj.velocity_y = RandomValues([player_obj.velocity_y - 1])
return obj_list
Expert #337 for obj_type player with weight = 0.02
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
# Check if the player object is not touching any other object.
if not any(player_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != player_obj):
# Set x-axis velocity to +0.
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #338 for obj_type player with weight = 0.25
def alter_player_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
for player_obj in player_objs:
if player_obj.velocity_x == 0:
touching_anything = False
for obj in obj_list.objs:
if player_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
player_obj.velocity_x = RandomValues([0])
return obj_list
Expert #339 for obj_type player with weight = 0.11
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.1) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_x = SeqValues([0, 0, 0, 0])
break
return obj_list
Expert #340 for obj_type player with weight = 0.06
def alter_player_objects(obj_list: ObjList, action: str, touch_side=2, touch_percent=0.1) -> ObjList:
if action == 'UP':
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
player_obj.velocity_y = SeqValues([6, 6, 6, 5])
break
return obj_list
Expert #341 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set x-axis velocity to +0
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #342 for obj_type player with weight = 0.25
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0, player_obj.velocity_y])
break
return obj_list
Expert #343 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #344 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Maintain the x-axis velocity by setting it to its current value.
player_obj.velocity_x = RandomValues([player_obj.velocity_x])
break
return obj_list
Expert #345 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Set the x-axis velocity to +0.
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #346 for obj_type player with weight = 0.08
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([player_obj.velocity_x]) # No change in x-axis velocity
break
return obj_list
Expert #347 for obj_type player with weight = 0.04
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0]) # Set x-axis velocity to +0
break
return obj_list
Expert #348 for obj_type player with weight = 0.30
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of obj_type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #349 for obj_type player with weight = 0.25
def alter_player_objects(obj_list: ObjList, action: str, touch_side=0, touch_percent=1.0) -> ObjList:
if action == 'LEFT':
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of obj_type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of obj_type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
player_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #350 for obj_type player with weight = 0.05
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for player_obj in player_objs:
for ladder_obj in ladder_objs:
if player_obj.touches(ladder_obj, touch_side, touch_percent):
# Maintain current y-axis velocity
player_obj.velocity_y = RandomValues([player_obj.velocity_y])
break
return obj_list
Expert #351 for obj_type player with weight = 0.37
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
return sum(1 for vy in obj.history['velocity_y'][-5:] if vy == 6)
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 3:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #352 for obj_type player with weight = 0.37
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
history_y = obj.history['velocity_y'][-5:]
return sum(1 for i in range(len(history_y) - 1) if history_y[i] == 6 and history_y[i + 1] == 4)
player_objs = obj_list.get_objs_by_obj_type('player')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 0:
for platform_obj in platform_objs:
if player_obj.touches(platform_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #353 for obj_type player with weight = 0.44
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
return sum(1 for vx in obj.history['velocity_x'][-5:] if vx == 0)
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
danger_attribute = compute_danger_attribute(player_obj)
if danger_attribute > 4:
for conveyer_belt_obj in conveyer_belt_objs:
if player_obj.touches(conveyer_belt_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #354 for obj_type player with weight = 0.44
def alter_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
return sum(1 for vy in obj.history['velocity_y'][-5:] if vy == 6)
player_objs = obj_list.get_objs_by_obj_type('player')
conveyer_belts = obj_list.get_objs_by_obj_type('conveyer_belt')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 3:
for conveyer_belt in conveyer_belts:
if player_obj.touches(conveyer_belt, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #355 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_x is consistently -3 over the latest 5 timesteps
if obj.history['velocity_x'][-5:] == [-3, -3, -3, -3, -3]:
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
danger_attribute = compute_danger_attribute(player_obj)
if danger_attribute > -1:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #356 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_y suddenly drops to -6 in the latest timestep
if obj.history['velocity_y'][-1] == -6:
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > 0:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #357 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_y is consistently 0 over the latest 5 timesteps
if obj.history['velocity_y'][-5:] == [0, 0, 0, 0, 0]:
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
danger_attribute = compute_danger_attribute(player_obj)
if danger_attribute > -1:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #358 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
def compute_danger_attribute(obj: Obj) -> int:
# Check if velocity_x is consistently near zero (-1, 0, or 1) over the latest 5 timesteps
if all(v in [-1, 0, 1] for v in obj.history['velocity_x'][-5:]):
return 1
return 0
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
if compute_danger_attribute(player_obj) > -1:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Expert #359 for obj_type player with weight = 0.15
def alter_player_objects(obj_list: ObjList, _, touch_side=0, touch_percent=0.30000000000000004) -> ObjList:
player_objs = obj_list.get_objs_by_obj_type('player')
skull_objs = obj_list.get_objs_by_obj_type('skull')
for player_obj in player_objs:
for skull_obj in skull_objs:
if player_obj.touches(skull_obj, touch_side, touch_percent):
obj_list = obj_list.create_object('player', 76, 73)
break
return obj_list
Constraint #1 for obj_type player
def check_x_of_player_objects(obj_list: ObjList, _, touch_side=2, touch_percent=0.30000000000000004) -> ObjList:
touch_ids, satisfied_ids = [], []
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
rope_objs = obj_list.get_objs_by_obj_type('rope') # get all Obj of type 'rope'
for player_obj in player_objs: # player_obj is of type Obj
for rope_obj in rope_objs: # rope_obj is of type Obj
if player_obj.touches(rope_obj, touch_side, touch_percent):
touch_ids.append(rope_obj.id)
if player_obj.center_x == rope_obj.center_x:
satisfied_ids.append(rope_obj.id)
return touch_ids, satisfied_ids
Constraint #2 for obj_type player
def check_y_of_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.1) -> ObjList:
touch_ids, satisfied_ids = [], []
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt') # get all Obj of type 'conveyer_belt'
for player_obj in player_objs: # player_obj is of type Obj
for conveyer_belt_obj in conveyer_belt_objs: # conveyer_belt_obj is of type Obj
if player_obj.touches(conveyer_belt_obj, touch_side, touch_percent):
touch_ids.append(conveyer_belt_obj.id)
if player_obj.bottom_side == conveyer_belt_obj.top_side:
satisfied_ids.append(conveyer_belt_obj.id)
return touch_ids, satisfied_ids
Constraint #3 for obj_type player
def check_y_of_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=0.5) -> ObjList:
touch_ids, satisfied_ids = [], []
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
platform_objs = obj_list.get_objs_by_obj_type('platform') # get all Obj of type 'platform'
for player_obj in player_objs: # player_obj is of type Obj
for platform_obj in platform_objs: # platform_obj is of type Obj
if player_obj.touches(platform_obj, touch_side, touch_percent):
touch_ids.append(platform_obj.id)
if player_obj.bottom_side == platform_obj.top_side:
satisfied_ids.append(platform_obj.id)
return touch_ids, satisfied_ids
Constraint #4 for obj_type player
def check_x_of_player_objects(obj_list: ObjList, _, touch_side=3, touch_percent=1.0) -> ObjList:
touch_ids, satisfied_ids = [], []
player_objs = obj_list.get_objs_by_obj_type('player') # get all Obj of type 'player'
ladder_objs = obj_list.get_objs_by_obj_type('ladder') # get all Obj of type 'ladder'
for player_obj in player_objs: # player_obj is of type Obj
for ladder_obj in ladder_objs: # ladder_obj is of type Obj
if player_obj.touches(ladder_obj, touch_side, touch_percent):
touch_ids.append(ladder_obj.id)
if player_obj.center_x == ladder_obj.center_x:
satisfied_ids.append(ladder_obj.id)
return touch_ids, satisfied_ids
---------------------------- Object type: key ----------------------------
Expert #1 for obj_type key with weight = 0.46
def alter_key_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
key_objs = obj_list.get_objs_by_obj_type('key') # get all Obj of type 'key'
for key_obj in key_objs: # key_obj is of type Obj
# Set the deleted attribute to 0, indicating the object is not deleted.
key_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type key with weight = 0.46
def alter_key_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
key_objs = obj_list.get_objs_by_obj_type('key')
for key_obj in key_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
key_obj.deleted = RandomValues([0])
return obj_list
Expert #3 for obj_type key with weight = 1.33
def alter_key_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
key_objs = obj_list.get_objs_by_obj_type('key')
for key_obj in key_objs:
# Check if the key object is touching any other object.
touching = False
for obj in obj_list.objs:
if key_obj.touches(obj, touch_side, touch_percent):
touching = True
break
# If not touching, set velocities to 0 to maintain position.
if not touching:
key_obj.velocity_x = RandomValues([0])
key_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type key with weight = 0.46
def alter_key_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
key_objs = obj_list.get_objs_by_obj_type('key')
for key_obj in key_objs:
# Check if the key object is touching any other object.
touching = False
for obj in obj_list.objs:
if key_obj.touches(obj, touch_side, touch_percent):
touching = True
break
# If not touching, ensure the object is not deleted.
if not touching:
key_obj.deleted = RandomValues([0])
return obj_list
Expert #5 for obj_type key with weight = 0.00
def alter_key_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# No key objects are created, so we simply return the original list.
return obj_list
---------------------------- Object type: skull ----------------------------
Expert #1 for obj_type skull with weight = 0.76
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Set the x-axis velocity to -1.
skull_obj.velocity_x = RandomValues([-1])
return obj_list
Expert #2 for obj_type skull with weight = 0.64
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0 and skull_obj.x <= 54:
skull_obj.velocity_x = SeqValues([0, 0, 1])
return obj_list
Expert #3 for obj_type skull with weight = 0.55
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x > 0: # check if x-axis velocity is positive
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = SeqValues([0, 1]) # set x-axis velocity to [+0, +1]
return obj_list
Expert #4 for obj_type skull with weight = 0.12
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if skull_obj.velocity_x == 0:
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
break
else:
skull_obj.velocity_x = RandomValues([1])
return obj_list
Expert #5 for obj_type skull with weight = 0.32
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x > 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = SeqValues([1, 0, 0])
return obj_list
Expert #6 for obj_type skull with weight = 0.61
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of obj_type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
# Becoming visible means the object is visible even though it was invisible before
condition = skull_obj.history['deleted'][-1] == 0 and skull_obj.history['deleted'][-2] == 1
if condition:
# Set x-axis velocity to [0, 1, 1, 1, 0, 1, 1]
skull_obj.velocity_x = SeqValues([0, 1, 1, 1, 0, 1, 1])
return obj_list
Expert #7 for obj_type skull with weight = 0.28
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.x >= 104 and skull_obj.velocity_x > 0:
skull_obj.velocity_x = SeqValues([0, -1])
return obj_list
Expert #8 for obj_type skull with weight = 0.71
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0: # check if x-axis velocity is negative
touching_anything = False
for other_obj in obj_list.objs:
if skull_obj.touches(other_obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
skull_obj.velocity_x = SeqValues([0, -1]) # set x-axis velocity to [+0, -1]
return obj_list
Expert #9 for obj_type skull with weight = 0.61
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is not touching any other object.
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# Change x-axis velocity to a random value.
skull_obj.velocity_x = RandomValues([skull_obj.velocity_x + 1, skull_obj.velocity_x - 1])
return obj_list
Expert #10 for obj_type skull with weight = 0.27
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is not touching any other object.
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# Maintain the current x-axis velocity.
skull_obj.velocity_x = RandomValues([skull_obj.velocity_x])
return obj_list
Expert #11 for obj_type skull with weight = 0.27
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Set the x-axis velocity to +1.
skull_obj.velocity_x = RandomValues([1])
return obj_list
Expert #12 for obj_type skull with weight = 0.85
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0 and skull_obj.x <= 54:
skull_obj.velocity_x = SeqValues([0, 1])
return obj_list
Expert #13 for obj_type skull with weight = 0.12
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
break
else:
# The skull objects that are not touching anything do not change their y-axis velocity to a non-zero value
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #14 for obj_type skull with weight = 0.12
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
break
else:
# The skull objects that are not touching anything set their y-axis velocity to +0
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #15 for obj_type skull with weight = 0.49
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_x = RandomValues([skull_obj.velocity_x]) # Maintain x-axis velocity.
return obj_list
Expert #16 for obj_type skull with weight = 0.34
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Set the y-axis velocity to 0.
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #17 for obj_type skull with weight = 0.23
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is not touching any other object.
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# Set x-axis velocity to +1.
skull_obj.velocity_x = RandomValues([1])
return obj_list
Expert #18 for obj_type skull with weight = 0.34
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Set the y-axis velocity to +0.
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #19 for obj_type skull with weight = 0.25
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of obj_type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
# Becoming visible means the object is visible even though it was invisible before
if skull_obj.history['deleted'][-1] == 0 and skull_obj.history['deleted'][-2] == 1:
skull_obj.velocity_x = SeqValues([-1, -1, -1, 0, -1, -1, -1, 0])
return obj_list
Expert #20 for obj_type skull with weight = 0.13
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of obj_type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
# Becoming visible means the object is visible even though it was invisible before
if skull_obj.history['deleted'][-1] == 0 and skull_obj.history['deleted'][-2] == 1:
skull_obj.velocity_x = SeqValues([-1, -1, -1, 0, -1, -1, -1, 0, -1])
break # Avoid setting the attribute value more than once
return obj_list
Expert #21 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is not touching any other object.
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# Maintain the current y-axis velocity.
skull_obj.velocity_y = RandomValues([skull_obj.velocity_y])
return obj_list
Expert #22 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is not touching any other object.
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# Set the y-axis velocity to 0.
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #23 for obj_type skull with weight = 0.38
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = RandomValues([skull_obj.velocity_x])
return obj_list
Expert #24 for obj_type skull with weight = 0.38
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = RandomValues([-abs(skull_obj.velocity_x)])
return obj_list
Expert #25 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_y == 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #26 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# If the skull object is not touching anything, ensure its y-axis velocity remains zero.
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #27 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
# Set the y-axis velocity to +0 if the skull object is not touching anything.
skull_obj.velocity_y = RandomValues([+0])
return obj_list
Expert #28 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if skull_obj.velocity_y == 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #29 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_y = RandomValues([skull_obj.velocity_y]) # Maintain current y-axis velocity
return obj_list
Expert #30 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_y = RandomValues([0]) # Set y-axis velocity to 0
return obj_list
Expert #31 for obj_type skull with weight = 0.02
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x == 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = RandomValues([-1])
return obj_list
Expert #32 for obj_type skull with weight = 0.07
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
skull_obj.deleted = RandomValues([0]) # Skull objects are not deleted.
return obj_list
Expert #33 for obj_type skull with weight = 0.02
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
if skull_obj.velocity_x == 0:
skull_obj.velocity_x = RandomValues([-1])
return obj_list
Expert #34 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_y = RandomValues([skull_obj.velocity_y])
return obj_list
Expert #35 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #36 for obj_type skull with weight = 0.07
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
skull_obj.deleted = RandomValues([0]) # Skull objects are not deleted.
return obj_list
Expert #37 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_y = RandomValues([skull_obj.velocity_y]) # Maintain y-axis velocity.
return obj_list
Expert #38 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if not any(skull_obj.touches(other, touch_side, touch_percent) for other in obj_list.objs if other != skull_obj):
skull_obj.velocity_y = RandomValues([0]) # Set y-axis velocity to +0.
return obj_list
Expert #39 for obj_type skull with weight = 0.02
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is touching any other object.
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
# If not touching, set x-axis velocity to 0.
if not touching:
skull_obj.velocity_x = RandomValues([0])
return obj_list
Expert #40 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is touching any other object.
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
# If not touching, set y-axis velocity to 0.
if not touching:
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #41 for obj_type skull with weight = 0.50
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0: # Check if x-axis velocity is negative
touching_anything = False
for other_obj in obj_list.objs:
if skull_obj.touches(other_obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
skull_obj.velocity_x = SeqValues([0, 0, 0]) # Set x-axis velocity to [+0, +0, +0]
return obj_list
Expert #42 for obj_type skull with weight = 0.35
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
skull_obj.deleted = RandomValues([0])
return obj_list
Expert #43 for obj_type skull with weight = 0.30
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is touching any other object.
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
# If not touching, do not change size (no size attribute to modify, so just pass).
if not touching:
pass
return obj_list
Expert #44 for obj_type skull with weight = 0.30
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
# Check if the skull object is touching any other object.
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
# If not touching, maintain current position (no position attribute to modify, so just pass).
if not touching:
pass
return obj_list
Expert #45 for obj_type skull with weight = 0.04
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if skull_obj.velocity_x < 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = RandomValues([0])
return obj_list
Expert #46 for obj_type skull with weight = 0.30
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if skull_obj.velocity_x < 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #47 for obj_type skull with weight = 0.32
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull')
for skull_obj in skull_objs:
if skull_obj.velocity_y == 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = RandomValues([0])
return obj_list
Expert #48 for obj_type skull with weight = 0.03
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x > 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_x = RandomValues([-1])
return obj_list
Expert #49 for obj_type skull with weight = 0.30
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_y > 0:
touching = False
for obj in obj_list.objs:
if skull_obj.touches(obj, touch_side, touch_percent):
touching = True
break
if not touching:
skull_obj.velocity_y = RandomValues([0])
return obj_list
Expert #50 for obj_type skull with weight = 0.49
def alter_skull_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
skull_objs = obj_list.get_objs_by_obj_type('skull') # get all Obj of type 'skull'
for skull_obj in skull_objs: # skull_obj is of type Obj
if skull_obj.velocity_x < 0: # check if x-axis velocity is negative
touching_anything = False
for other_obj in obj_list.objs:
if skull_obj.touches(other_obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
skull_obj.velocity_y = SeqValues([0, -1]) # set y-axis velocity to [+0, -1]
return obj_list
Expert #51 for obj_type skull with weight = 0.00
def alter_skull_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# No skull objects are created, so we simply return the original list without any changes.
return obj_list
---------------------------- Object type: barrier ----------------------------
Expert #1 for obj_type barrier with weight = 1.45
def alter_barrier_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for barrier_obj in barrier_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
barrier_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type barrier with weight = 1.33
def alter_barrier_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for barrier_obj in barrier_objs:
# Set the x-axis velocity to 0.
barrier_obj.velocity_x = RandomValues([0])
return obj_list
Expert #3 for obj_type barrier with weight = 1.33
def alter_barrier_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
barrier_objs = obj_list.get_objs_by_obj_type('barrier')
for barrier_obj in barrier_objs:
# Set the y-axis velocity to 0.
barrier_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type barrier with weight = 0.00
def alter_barrier_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# Since no barrier objects are created, we simply return the original obj_list without any changes.
return obj_list
---------------------------- Object type: rope ----------------------------
Expert #1 for obj_type rope with weight = 0.69
def alter_rope_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
rope_objs = obj_list.get_objs_by_obj_type('rope')
for rope_obj in rope_objs:
# Set the deleted attribute to 0, indicating the object is not deleted
rope_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type rope with weight = 1.26
def alter_rope_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
rope_objs = obj_list.get_objs_by_obj_type('rope')
for rope_obj in rope_objs:
# Set the x-axis velocity to 0
rope_obj.velocity_x = RandomValues([0])
return obj_list
Expert #3 for obj_type rope with weight = 1.26
def alter_rope_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
rope_objs = obj_list.get_objs_by_obj_type('rope')
for rope_obj in rope_objs:
# Set the y-axis velocity to 0
rope_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type rope with weight = 0.69
def alter_rope_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
rope_objs = obj_list.get_objs_by_obj_type('rope')
for rope_obj in rope_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
rope_obj.deleted = RandomValues([0])
return obj_list
Expert #5 for obj_type rope with weight = 0.00
def alter_rope_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# No new rope objects are created, so we simply return the original list.
return obj_list
---------------------------- Object type: platform ----------------------------
Expert #1 for obj_type platform with weight = 1.51
def alter_platform_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
platform_objs = obj_list.get_objs_by_obj_type('platform')
for platform_obj in platform_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
platform_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type platform with weight = 1.45
def alter_platform_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
platform_objs = obj_list.get_objs_by_obj_type('platform')
for platform_obj in platform_objs:
# Set the x-axis velocity to 0.
platform_obj.velocity_x = RandomValues([0])
return obj_list
Expert #3 for obj_type platform with weight = 1.46
def alter_platform_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
platform_objs = obj_list.get_objs_by_obj_type('platform')
for platform_obj in platform_objs:
# Set the y-axis velocity to 0.
platform_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type platform with weight = 0.00
def alter_platform_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# No platform objects are created, so we simply return the original obj_list without any changes.
return obj_list
---------------------------- Object type: ladder ----------------------------
Expert #1 for obj_type ladder with weight = 1.48
def alter_ladder_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for ladder_obj in ladder_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
ladder_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type ladder with weight = 0.45
def alter_ladder_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for ladder_obj in ladder_objs:
# Set the x-axis velocity to 0.
ladder_obj.velocity_x = RandomValues([0])
return obj_list
Expert #3 for obj_type ladder with weight = 0.45
def alter_ladder_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
for ladder_obj in ladder_objs:
# Set the y-axis velocity to 0.
ladder_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type ladder with weight = 0.45
def alter_ladder_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for ladder_obj in ladder_objs:
for platform_obj in platform_objs:
if ladder_obj.touches(platform_obj, touch_side, touch_percent):
ladder_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #5 for obj_type ladder with weight = 0.45
def alter_ladder_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for ladder_obj in ladder_objs:
for platform_obj in platform_objs:
if ladder_obj.touches(platform_obj, touch_side, touch_percent):
ladder_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #6 for obj_type ladder with weight = 0.45
def alter_ladder_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for ladder_obj in ladder_objs:
for platform_obj in platform_objs:
if ladder_obj.touches(platform_obj, touch_side, touch_percent) and ladder_obj.velocity_x == 0:
ladder_obj.velocity_x = RandomValues([0])
break
return obj_list
Expert #7 for obj_type ladder with weight = 0.45
def alter_ladder_objects(obj_list: ObjList, _, touch_side=2, touch_percent=1.0) -> ObjList:
ladder_objs = obj_list.get_objs_by_obj_type('ladder')
platform_objs = obj_list.get_objs_by_obj_type('platform')
for ladder_obj in ladder_objs:
for platform_obj in platform_objs:
if ladder_obj.touches(platform_obj, touch_side, touch_percent) and ladder_obj.velocity_y == 0:
ladder_obj.velocity_y = RandomValues([0])
break
return obj_list
Expert #8 for obj_type ladder with weight = 0.00
def alter_ladder_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# No ladder objects are created, so we simply return the original obj_list without any changes.
return obj_list
---------------------------- Object type: conveyer_belt ----------------------------
Expert #1 for obj_type conveyer_belt with weight = 0.59
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Set the deleted attribute to 0, indicating the object is not deleted
conveyer_belt_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type conveyer_belt with weight = 1.23
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Set the x-axis velocity to 0
conveyer_belt_obj.velocity_x = RandomValues([0])
return obj_list
Expert #3 for obj_type conveyer_belt with weight = 1.23
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Set the y-axis velocity to 0
conveyer_belt_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type conveyer_belt with weight = 0.59
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
conveyer_belt_obj.deleted = RandomValues([0])
return obj_list
Expert #5 for obj_type conveyer_belt with weight = 0.27
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
conveyer_belt_obj.deleted = RandomValues([0])
return obj_list
Expert #6 for obj_type conveyer_belt with weight = 0.05
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Check if the conveyer_belt object is not touching any other object.
if not any(conveyer_belt_obj.touches(obj, touch_side, touch_percent) for obj in obj_list.objs if obj != conveyer_belt_obj):
conveyer_belt_obj.velocity_x = RandomValues([0])
return obj_list
Expert #7 for obj_type conveyer_belt with weight = 0.05
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
# Check if the conveyer_belt object is not touching any other object.
if not any(conveyer_belt_obj.touches(obj, touch_side, touch_percent) for obj in obj_list.objs if obj != conveyer_belt_obj):
conveyer_belt_obj.velocity_y = RandomValues([0])
return obj_list
Expert #8 for obj_type conveyer_belt with weight = 0.05
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
if conveyer_belt_obj.velocity_x == 0:
touching_anything = False
for obj in obj_list.objs:
if conveyer_belt_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
conveyer_belt_obj.velocity_x = RandomValues([0])
return obj_list
Expert #9 for obj_type conveyer_belt with weight = 0.05
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=-1, touch_percent=0.1) -> ObjList:
conveyer_belt_objs = obj_list.get_objs_by_obj_type('conveyer_belt')
for conveyer_belt_obj in conveyer_belt_objs:
if conveyer_belt_obj.velocity_y == 0:
touching_anything = False
for obj in obj_list.objs:
if conveyer_belt_obj.touches(obj, touch_side, touch_percent):
touching_anything = True
break
if not touching_anything:
conveyer_belt_obj.velocity_y = RandomValues([0])
return obj_list
Expert #10 for obj_type conveyer_belt with weight = 0.00
def alter_conveyer_belt_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# No new conveyer_belt objects are created, so we simply return the obj_list as is.
return obj_list
---------------------------- Object type: wall ----------------------------
Expert #1 for obj_type wall with weight = 1.55
def alter_wall_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
wall_objs = obj_list.get_objs_by_obj_type('wall')
for wall_obj in wall_objs:
# Set the deleted attribute to 0, indicating the object is not deleted.
wall_obj.deleted = RandomValues([0])
return obj_list
Expert #2 for obj_type wall with weight = 1.40
def alter_wall_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
wall_objs = obj_list.get_objs_by_obj_type('wall')
for wall_obj in wall_objs:
# Set the x-axis velocity to 0.
wall_obj.velocity_x = RandomValues([0])
return obj_list
Expert #3 for obj_type wall with weight = 1.40
def alter_wall_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
wall_objs = obj_list.get_objs_by_obj_type('wall')
for wall_obj in wall_objs:
# Set the y-axis velocity to 0.
wall_obj.velocity_y = RandomValues([0])
return obj_list
Expert #4 for obj_type wall with weight = 0.00
def alter_wall_objects(obj_list: ObjList, _, touch_side=0, touch_percent=1.0) -> ObjList:
# Since no wall objects are created, we simply return the original obj_list without any changes.
return obj_list