<s> from globals import * <EOL> import life as lfe <EOL> import references <EOL> import judgement <EOL> import chunks <EOL> import goals <EOL> import maps <EOL> import random <EOL> STATE = '<STR_LIT>' <EOL> TIER = TIER_SURVIVAL - <NUM_LIT> <EOL> def get_tier ( life ) : <EOL> if not lfe . execute_raw ( life , '<STR_LIT>' , '<STR_LIT>' ) and lfe . execute_raw ( life , '<STR_LIT:state>' , '<STR_LIT>' ) : <EOL> return TIER_IDLE - <NUM_LIT> <EOL> return TIER <EOL> def tick ( life ) : <EOL> if not '<STR_LIT>' in life [ '<STR_LIT>' ] : <EOL> life [ '<STR_LIT>' ] [ '<STR_LIT>' ] = judgement . get_best_shelter ( life ) <EOL> if not life [ '<STR_LIT>' ] [ '<STR_LIT>' ] in life [ '<STR_LIT>' ] : <EOL> judgement . judge_chunk ( life , life [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) <EOL> if not chunks . get_flag ( life , life [ '<STR_LIT>' ] [ '<STR_LIT>' ] , '<STR_LIT>' ) : <EOL> return False <EOL> if not list ( life [ '<STR_LIT>' ] [ : <NUM_LIT:2> ] ) in chunks . get_flag ( life , life [ '<STR_LIT>' ] [ '<STR_LIT>' ] , '<STR_LIT>' ) : <EOL> if not lfe . path_dest ( life ) or ( not chunks . position_is_in_chunk ( lfe . path_dest ( life ) , life [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) ) : <EOL> _cover = chunks . get_flag ( life , life [ '<STR_LIT>' ] [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> lfe . walk_to ( life , random . choice ( _cover ) ) </s>
