2 from __future__ 
import print_function
 
    4 female_names = [
"Emma", 
"Taylor", 
"Sophia", 
"Isabella", 
"Ava", 
"Robin", 
"Emily", 
"Angel", 
"Madison", 
"Charlotte"]
 
    5 male_names = [
"Noah", 
"Liam", 
"Mason", 
"Jacob", 
"William", 
"Ethan", 
"Michael", 
"Alexander", 
"James", 
"Daniel"]
 
    6 names = female_names + male_names
 
   11 category_locations = {}
 
   13 inspect_positions = {}
 
   19     { 
'name' : 
'choco_syrup',   
'category' : 
'candies' },
 
   20     { 
'name' : 
'biscuits',      
'category' : 
'candies' },
 
   21     { 
'name' : 
'baby_sweets',   
'category' : 
'candies' },
 
   22     { 
'name' : 
'egg',           
'category' : 
'candies' },
 
   23     { 
'name' : 
'chips',         
'category' : 
'snacks' },
 
   24     { 
'name' : 
'pretzels',      
'category' : 
'snacks' },
 
   25     { 
'name' : 
'pringles',      
'category' : 
'snacks' },
 
   26     { 
'name' : 
'beer',          
'category' : 
'drinks' },
 
   27     { 
'name' : 
'coconut_milk',  
'category' : 
'drinks' },
 
   28     { 
'name' : 
'coke',          
'category' : 
'drinks' },
 
   29     { 
'name' : 
'tea',           
'category' : 
'drinks' },
 
   30     { 
'name' : 
'apple',         
'category' : 
'food' },
 
   31     { 
'name' : 
'paprika',       
'category' : 
'food' },
 
   32     { 
'name' : 
'pumper_nickel', 
'category' : 
'food' },
 
   33     { 
'name' : 
'shampoo',       
'category' : 
'toiletries' },
 
   34     { 
'name' : 
'soap',          
'category' : 
'toiletries' },
 
   35     { 
'name' : 
'sponge',        
'category' : 
'toiletries' },
 
   36     { 
'name' : 
'cloth',         
'category' : 
'toiletries' },
 
   37     { 
'name' : 
'bowl',          
'category' : 
'containers' },
 
   38     { 
'name' : 
'tray',          
'category' : 
'containers' },
 
   39     { 
'name' : 
'plate',         
'category' : 
'containers' }
 
   42 object_names = list(set([ o[
"name"] 
for o 
in objects ]))
 
   43 object_categories = list(set([ o[
"category"] 
for o 
in objects ]))
 
   49         if loc[
"name"] == location:
 
   56         if loc[
"name"] == location:
 
   62     if location 
in inspect_areas:
 
   63         return inspect_areas[location]
 
   69     if location 
in inspect_positions 
and area 
in inspect_positions[location]:
 
   70         return inspect_positions[location][area]
 
   77         if loc[
"name"] == location 
and loc[
"manipulation"] == 
"yes":
 
   84         if loc[
"name"] == location 
and (loc[
"manipulation"] == 
"yes" or loc[
"manipulation"] == 
"only_putting"):
 
   90     return [loc[
"name"] 
for loc 
in locations 
if (room 
is None or loc[
"room"] == room) 
and 
   91             (pick_location 
is None or pick_location == 
is_pick_location(loc[
"name"])) 
and 
   97     return [obj[
"name"] 
for obj 
in objects
 
   98                 if category == 
None or category == obj[
"category"]]
 
  109     location, area_name = next(iter(category_locations[obj_cat].items()))
 
  110     return location, area_name
 
  116     print(
"\n-----------------------------------------------------------------------------")
 
  119         print(
"object '{}'".format(obj))
 
  120         print(
"    category: '{}'".format(cat))
 
  122         print(
"    found '{} {}'".format(area_name, location))
 
  124     print(
"\n-----------------------------------------------------------------------------")
 
  126         print(
"location '{}', room: '{}'".format(loc, 
get_room(loc)))
 
  128     print(
"\n-----------------------------------------------------------------------------")
 
  129     print(
"Pick locations:")
 
  131         print(
"    {}".format(loc))
 
  133     print(
"\n-----------------------------------------------------------------------------")
 
  134     print(
"Place locations:")
 
  136         print(
"    {}".format(loc))
 
  139     print(
"\n-----------------------------------------------------------------------------")
 
  140     print(
"None-manipulation locations:")
 
  141     for loc 
in get_locations(pick_location=
False, place_location=
False):
 
  142         print(
"    {}".format(loc))