#NEWLINE# def setup( life ) : #NEWLINE# #INDENT# _needs_to_meet = [ ] #NEWLINE# _needs_to_satisfy = [ ] #NEWLINE# _needs_unmet = [ ] #NEWLINE# for need in life [ 'needs' ] . values ( ) : #NEWLINE# #INDENT# if ( not survival . needs_to_satisfy ( life , need ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if survival . can_satisfy ( life , need ) : #NEWLINE# #INDENT# _needs_to_satisfy . append ( need ) #NEWLINE# #UNINDENT# if ( ( not survival . can_satisfy ( life , need ) ) and ( not survival . can_potentially_satisfy ( life , need ) ) ) : #NEWLINE# #INDENT# _needs_unmet . append ( need ) #NEWLINE# continue #NEWLINE# #UNINDENT# if ( ( not ( need in _needs_to_satisfy ) ) and ( not ( need in _needs_to_satisfy ) ) ) : #NEWLINE# #INDENT# _needs_to_meet . append ( need ) #NEWLINE# #UNINDENT# #UNINDENT# brain . store_in_memory ( life , 'needs_to_meet' , _needs_to_meet ) #NEWLINE# brain . store_in_memory ( life , 'needs_to_satisfy' , _needs_to_satisfy ) #NEWLINE# brain . store_in_memory ( life , 'needs_unmet' , _needs_unmet ) #NEWLINE# if ( ( not _needs_to_meet ) and ( not _needs_to_satisfy ) ) : #NEWLINE# #INDENT# return False