
----PROMPT for planning----
from actions import turnright, turnleft, walkforward, walktowards <obj>, walk <obj>, run <obj>, grab <obj>, switchon <obj>, switchoff <obj>, open <obj>, close <obj>, lookat <obj>, sit <obj>, standup, find <obj>, turnto <obj>, drink <obj>, pointat <obj>, watch <obj>, putin <obj> <obj>, putback <obj> <obj>

objects = ['chocolatesyrup', 'oventray', 'plum', 'cpuscreen', 'ceilinglamp', 'coffeemaker', 'towelrack', 'tv', 'washingsponge', 'radio', 'tablelamp', 'hanger', 'stovefan', 'kitchen', 'barsoap', 'toilet', 'doorjamb', 'breadslice', 'remotecontrol', 'clothespile', 'cereal', 'clothesshirt', 'bellpepper', 'bathroomcabinet', 'chair', 'clothespants', 'nightstand', 'sink', 'peach', 'tvstand', 'washingmachine', 'bedroom', 'closetdrawer', 'candybar', 'stove', 'closet', 'lime', 'deodorant', 'dishbowl', 'window', 'folder', 'wallphone', 'mouse', 'dishwashingliquid', 'photoframe', 'candle', 'box', 'chips', 'facecream', 'salmon', 'bathtub', 'faucet', 'condimentbottle', 'paper', 'microwave', 'stall', 'cupcake', 'whippedcream', 'crackers', 'wall', 'cabinet', 'condimentshaker', 'painkillers', 'kitchencounterdrawer', 'rug', 'orchid', 'kitchentable', 'perfume', 'garbagecan', 'plate', 'fridge', 'slippers', 'floor', 'wallshelf', 'towel', 'livingroom', 'coffeepot', 'pie', 'book', 'wineglass', 'cellphone', 'pillow', 'fryingpan', 'mug', 'bed', 'wallpictureframe', 'clock', 'kitchencabinet', 'powersocket', 'bookshelf', 'toothpaste', 'hairproduct', 'walllamp', 'bananas', 'door', 'lightswitch', 'curtains', 'kitchencounter', 'toaster', 'coffeetable', 'bathroomcounter', 'creamybuns', 'bench', 'keyboard', 'bathroom', 'toothbrush', 'cutleryknife', 'ceiling', 'cutleryfork', 'apple', 'desk', 'computer', 'waterglass', 'sofa', 'mousemat']

def put_the_wine_glass_in_the_kitchen_cabinet():
	# 0: walk to kitchen
	walk('kitchen')
	# 1: find wine glass
	find('wineglass')
	# 2: grab wine glass
	assert('close' to 'wineglass')
		else: find('wineglass')
	grab('wineglass')
	# 3: find kitchen cabinet
	find('kitchencabinet')
	# 4: open kitchen cabinet
	assert('close' to 'kitchencabinet' )  
		else: find('kitchencabinet')
	assert('kitchencabinet' is 'closed' )
		else: close('kitchencabinet')
	open('kitchencabinet')
	# 5: put wine glass in kitchen cabinet
	assert('wineglass' in 'hands' )
		else: find('wineglass')
		else: grab('wineglass')
	assert('close' to 'kitchencabinet' )  
		else: find('kitchencabinet')
	assert('kitchencabinet' is 'opened' )
		else: open('kitchencabinet')
	putin('wineglass', 'kitchencabinet')
	# 6: close kitchen cabinet
	assert('close' to 'kitchencabinet' )
		else: find('kitchencabinet')
	assert('kitchencabinet' is 'opened' )
		else: open('kitchencabinet')
	close('kitchencabinet')
	# 7: Done

def throw_away_the_lime():
	# 0: walk to kitchen
	walk('kitchen')
	# 1: find garbage can
	find('garbagecan')
	# 2: grab lime
	find('lime')
	assert('close' to 'lime')
		else: find('lime')
	grab('lime')
	# 3: put lime in garbage can
	find('garbagecan')
	assert('close' to 'garbagecan' )  
		else: find('garbagecan')
	assert('garbagecan' is 'closed' )
		else: close('garbagecan')
	open('garbagecan')
	assert('lime' in 'hands' )
		else: find('lime')
		else: grab('lime')
	assert('close' to 'garbagecan' )  
		else: find('garbagecan')
	assert('garbagecan' is 'opened' )
		else: open('garbagecan')
	putin('lime', 'garbagecan')
	assert('close' to 'garbagecan' )
		else: find('garbagecan')
	assert('garbagecan' is 'opened' )
		else: open('garbagecan')
	close('garbagecan')
	# 4: Done

def wash_mug():
	# 0: walk to kitchen
	walk('kitchen')
	# 1: find sink
	find('sink')
	# 2: turn on faucet
	find('faucet')
	find('faucet')
	find('faucet')
	assert('close' to 'faucet' )  
		else: find('faucet')
	assert('faucet' is 'switchoff' )
		else: switchoff('faucet')
	switchon('faucet')
	# 3: put mug under water
	find('mug')
	find('mug')
	find('mug')
	assert('close' to 'mug')
		else: find('mug')
	grab('mug')
	find('sink')
	assert('mug' in 'hands' )
		else: find('mug')
		else: grab('mug')
	assert('close' to 'sink' )  
		else: find('sink')
	putin('mug', 'sink')
	# 4: grab dishwashing liquid
	find('dishwashingliquid')
	assert('close' to 'dishwashingliquid')
		else: find('dishwashingliquid')
	grab('dishwashingliquid')
	# 5: put dishwashing liquid on mug
	find('sink')
	assert('dishwashingliquid' in 'hands' )
		else: find('dishwashingliquid')
		else: grab('dishwashingliquid')
	assert('close' to 'sink' )  
		else: find('sink')
	putin('dishwashingliquid', 'sink')
	# 6: grab washingsponge
	find('washingsponge')
	assert('close' to 'washingsponge')
		else: find('washingsponge')
	grab('washingsponge')
	# 7: start scrubbing mug
	find('sink')
	assert('washingsponge' in 'hands' )
		else: find('washingsponge')
		else: grab('washingsponge')
	assert('close' to 'sink' )  
		else: find('sink')
	putin('washingsponge', 'sink')
	# 8: rinse mug off with water 1
	# 9: dry mug with towel 1
	# 10: Done
	find('faucet')
	assert('close' to 'faucet' )
		else: find('faucet')
	assert('faucet' is 'switchon' )
		else: switchon('faucet')
	switchoff('faucet')

def refrigerate_the_salmon():
	# 0: I would go to the kitchen and find the salmon.
	find('kitchen')
	find('salmon')
	# 1: I would take the salmon and put it in the fridge.
	assert('close' to 'salmon')
		else: find('salmon')
	grab('salmon')
	find('fridge')
	assert('close' to 'fridge' )  
		else: find('fridge')
	assert('fridge' is 'closed' )
		else: close('fridge')
	open('fridge')
	assert('salmon' in 'hands' )
		else: find('salmon')
		else: grab('salmon')
	assert('close' to 'fridge' )  
		else: find('fridge')
	assert('fridge' is 'opened' )
		else: open('fridge')
	putin('salmon', 'fridge')
	# 2: I would close the fridge.
	assert('close' to 'fridge' )
		else: find('fridge')
	assert('fridge' is 'opened' )
		else: open('fridge')
	close('fridge')
	# 3: Done

def bring_me_some_fruit():
	# 0: walk to kitchen
	walk('kitchen')
	# 1: find fruit
	find('bananas')
	# 2: grab fruit
	assert('close' to 'bananas')
		else: find('bananas')
	grab('bananas')
	# 3: bring fruit to you
	find('livingroom')
	# 4: Done

def wash_clothes():
	# 0: walk to laundry room
	walk('bathroom')
	# 1: find washing machine
	find('washingmachine')
	# 2: put clothes in washing machine
	find('clothespile')
	find('closet')
	find('closet')
	find('closet')
	assert('close' to 'closet' )  
		else: find('closet')
	assert('closet' is 'closed' )
		else: close('closet')
	open('closet')
	find('clothespile')
	find('closet')
	find('clothespile')
	assert('close' to 'clothespile')
		else: find('clothespile')
	grab('clothespile')
	find('washingmachine')
	assert('close' to 'washingmachine' )  
		else: find('washingmachine')
	assert('washingmachine' is 'closed' )
		else: close('washingmachine')
	open('washingmachine')
	assert('clothespile' in 'hands' )
		else: find('clothespile')
		else: grab('clothespile')
	assert('close' to 'washingmachine' )  
		else: find('washingmachine')
	assert('washingmachine' is 'opened' )
		else: open('washingmachine')
	putin('clothespile', 'washingmachine')
	# 3: add detergent
	# 4: start washing machine
	assert('close' to 'washingmachine' )
		else: find('washingmachine')
	assert('washingmachine' is 'opened' )
		else: open('washingmachine')
	close('washingmachine')
	assert('close' to 'washingmachine' )  
		else: find('washingmachine')
	assert('washingmachine' is 'switchoff' )
		else: switchoff('washingmachine')
	switchon('washingmachine')
	# 5: wait for cycle to finish
	# 6: take clothes out of washing machine
	assert('close' to 'washingmachine' )
		else: find('washingmachine')
	assert('washingmachine' is 'switchon' )
		else: switchon('washingmachine')
	switchoff('washingmachine')
	assert('close' to 'washingmachine' )  
		else: find('washingmachine')
	assert('washingmachine' is 'closed' )
		else: close('washingmachine')
	open('washingmachine')
	assert('close' to 'clothespile')
		else: find('clothespile')
	grab('clothespile')
	assert('close' to 'washingmachine' )
		else: find('washingmachine')
	assert('washingmachine' is 'opened' )
		else: open('washingmachine')
	close('washingmachine')
	# 7: put clothes in dryer
	# 8: set dryer for appropriate time 1
	# 9: start dryer 1
	# 10: wait for cycle to finish 1
	# 11: take clothes out of dryer 1
	# 12: put clothes away 1
	# 13: Done

----Test set tasks----
['eat chips on the sofa', 'put salmon in the fridge', 'wash the plate', 'bring coffeepot and cupcake to the coffee table', 'microwave salmon', 'watch tv', 'turn off light', 'brush teeth', 'throw away apple', 'make toast']
Total: 10 tasks

----PROMPT for state check----
You see: microwave is OFF and CLOSED, lightswitch is ON, cereal, bookshelf, book is CLOSED, bookshelf ON floor, microwave ON kitchencounterdrawer, salmon ON microwave, book INSIDE bookshelf, dishbowl INSIDE bookshelf, clothespile INSIDE bookshelf, bananas INSIDE bookshelf, box ON bookshelf, book ON kitchentable, dishbowl ON bookshelf, condimentshaker INSIDE bookshelf, box INSIDE bookshelf, character HOLD_RH book, book ON rug, cereal ON wallshelf, plate INSIDE microwave, condimentbottle INSIDE bookshelf, microwave ON kitchencounter, paper INSIDE bookshelf

assert('close' to 'mug' )
False
assert('close' to 'microwave' )
True
assert('book' is 'closed' )
True
assert('lightswitch' is 'OFF')
False
assert('book' in 'bookshelf')
True
assert('book' in 'hands')
True
assert('cereal' on 'bookshelf')
False

--Executing task: eat chips on the sofa--
Plan:  # 0: walk to living room
walk('livingroom')
# 1: find chips
find('chips')
# 2: grab chips
assert('close' to 'chips')
    else: find('chips')
grab('chips')
# 3: walk to sofa
walk('sofa')
# 4: sit on sofa
sit('sofa')
# 5: eat chips
# 6: Done

<char0> [walk] <livingroom> (335)
<char0> [find] <chips> (329)
State check:
You see: chips, chips ON wallshelf.
assert('close' to 'chips')
True
<char0> [grab] <chips> (329)
<char0> [walk] <sofa> (368)
<char0> [sit] <sofa> (368)

--Executing task: put salmon in the fridge--
Plan:  # 0: I would go to the kitchen and find the salmon.
find('kitchen')
find('salmon')
# 1: I would take the salmon and put it in the fridge.
assert('close' to 'salmon')
	else: find('salmon')
grab('salmon')
find('fridge')
assert('close' to 'fridge' )  
	else: find('fridge')
assert('fridge' is 'closed' )
	else: close('fridge')
open('fridge')
assert('salmon' in 'hands' )
	else: find('salmon')
	else: grab('salmon')
assert('close' to 'fridge' )  
	else: find('fridge')
assert('fridge' is 'opened' )
	else: open('fridge')
putin('salmon', 'fridge')
# 2: I would close the fridge.
assert('close' to 'fridge' )
	else: find('fridge')
assert('fridge' is 'opened' )
	else: open('fridge')
close('fridge')
# 3: Done

<char0> [find] <kitchen> (205)
<char0> [find] <salmon> (327)
State check:
You see: salmon, salmon ON microwave.
assert('close' to 'salmon')
True
<char0> [grab] <salmon> (327)
<char0> [find] <fridge> (305)
State check:
You see: fridge is CLOSED, fridge ON floor.  You have salmon.
assert('close' to 'fridge' )
True
State check:
You see: fridge is CLOSED, fridge ON floor.  You have salmon.
assert('fridge' is 'closed' )
True
<char0> [open] <fridge> (305)
State check:
You see: salmon, fridge ON floor.  You have salmon.
assert('salmon' in 'hands' )
True
State check:
You see: fridge is OPEN, fridge ON floor.  You have salmon.
assert('close' to 'fridge' )
False
<char0> [find] <fridge> (305)
State check:
You see: fridge is OPEN, fridge ON floor.  You have salmon.
assert('fridge' is 'opened' )
True
<char0> [putin] <salmon> (327) <fridge> (305)
State check:
You see: fridge is OPEN, salmon INSIDE fridge, fridge ON floor.
assert('close' to 'fridge' )
False
<char0> [find] <fridge> (305)
State check:
You see: fridge is OPEN, salmon INSIDE fridge, fridge ON floor.
assert('fridge' is 'opened' )
True
<char0> [close] <fridge> (305)

--Executing task: wash the plate--
Plan:  # 0: walk to kitchen
walk('kitchen')
# 1: find plate
find('plate')
# 2: grab plate
assert('close' to 'plate')
    else: find('plate')
grab('plate')
# 3: find sink
find('sink')
# 4: put plate in sink
assert('plate' in 'hands')
    else: find('plate')
    else: grab('plate')
assert('close' to 'sink')
    else: find('sink')
putin('plate', 'sink')
# 5: grab dishwashing liquid
find('dishwashingliquid')
assert('close' to 'dishwashingliquid')
    else: find('dishwashingliquid')
grab('dishwashingliquid')
# 6: put dishwashing liquid on plate
assert('dishwashingliquid' in 'hands')
    else: find('dishwashingliquid')
    else: grab('dishwashingliquid')
assert('close' to 'sink')
    else: find('sink')
putin('dishwashingliquid', 'sink')
# 7: grab washingsponge
find('washingsponge')
assert('close' to 'washingsponge')
    else: find('washingsponge')
grab('washingsponge')
# 8: start scrubbing plate
assert('washingsponge' in 'hands')
    else: find('washingsponge')
    else: grab('washingsponge')
assert('close' to 'sink')
    else: find('sink')
putin('washingsponge', 'sink')
# 9: rinse plate off with water
# 10: dry plate with towel
# 11: Done

<char0> [walk] <kitchen> (205)
<char0> [find] <plate> (278)
State check:
You see: plate, plate ON kitchentable.
assert('close' to 'plate')
True
<char0> [grab] <plate> (278)
<char0> [find] <sink> (247)
State check:
You see: plate, .  You have plate.
assert('plate' in 'hands')
True
State check:
You see: sink
assert('close' to 'sink')
True
<char0> [putin] <plate> (278) <sink> (247)
<char0> [find] <dishwashingliquid> (267)
State check:
You see: dishwashingliquid, dishwashingliquid ON kitchencounter.
assert('close' to 'dishwashingliquid')
True
<char0> [grab] <dishwashingliquid> (267)
State check:
You see: dishwashingliquid, .  You have dishwashingliquid.
assert('dishwashingliquid' in 'hands')
True
State check:
You see: 
assert('close' to 'sink')
False
<char0> [find] <sink> (247)
State check:
You see: sink
putin('dishwashingliquid', 'sink')
True  
False  
True  
False  
True  
False  
False
<char0> [putin] <dishwashingliquid> (267) <sink> (247)
<char0> [find] <washingsponge> (266)
State check:
You see: washingsponge, washingsponge ON kitchencounter.
assert('close' to 'washingsponge')
True
<char0> [grab] <washingsponge> (266)
State check:
You see: washingsponge, .  You have washingsponge.
assert('washingsponge' in 'hands')
True
State check:
You see: 
assert('close' to 'sink')
False
<char0> [find] <sink> (247)
State check:
You see: sink
putin('washingsponge', 'sink')
True  
False  
True  
False  
True  
False  
False  
True
<char0> [putin] <washingsponge> (266) <sink> (247)

--Executing task: bring coffeepot and cupcake to the coffee table--
Plan:  # 0: walk to kitchen
walk('kitchen')
# 1: find coffeepot
find('coffeepot')
# 2: grab coffeepot
assert('close' to 'coffeepot')
    else: find('coffeepot')
grab('coffeepot')
# 3: find cupcake
find('cupcake')
# 4: grab cupcake
assert('close' to 'cupcake')
    else: find('cupcake')
grab('cupcake')
# 5: walk to coffee table
walk('coffeetable')
# 6: put coffeepot on coffee table
assert('coffeepot' in 'hands')
    else: find('coffeepot')
    else: grab('coffeepot')
assert('close' to 'coffeetable')
    else: find('coffeetable')
puton('coffeepot', 'coffeetable')
# 7: put cupcake on coffee table
assert('cupcake' in 'hands')
    else: find('cupcake')
    else: grab('cupcake')
assert('close' to 'coffeetable')
    else: find('coffeetable')
puton('cupcake', 'coffeetable')
# 8: Done

<char0> [walk] <kitchen> (205)
<char0> [find] <coffeepot> (307)
State check:
You see: coffeepot is CLOSED, coffeepot INSIDE coffeemaker, coffeepot ON kitchencounter.
assert('close' to 'coffeepot')
True
<char0> [grab] <coffeepot> (307)
<char0> [find] <cupcake> (195)
State check:
You see: cupcake, cupcake ON desk.  You have coffeepot.
assert('close' to 'cupcake')
True
<char0> [grab] <cupcake> (195)
<char0> [walk] <coffeetable> (371)
State check:
You see: coffeepot is CLOSED, coffeepot.
assert('coffeepot' in 'hands')
False
<char0> [find] <coffeepot> (307)
<char0> [grab] <coffeepot> (307)
act_success: False, message: <character> (1) does not have a free hand when executing "[GRAB] <coffeepot> (307) [0]"
State check:
You see: coffeetable, coffeetable ON rug.  You have cupcake
assert('close' to 'coffeetable')
True
<char0> [puton] <coffeepot> (307) <coffeetable> (371)
State check:
You see: cupcake, coffeetable ON rug.  You have cupcake
assert('cupcake' in 'hands')
True
State check:
You see: coffeetable, coffeetable ON rug.  You have cupcake
assert('close' to 'coffeetable')
True
<char0> [puton] <cupcake> (195) <coffeetable> (111)

--Executing task: microwave salmon--
Plan:  # 0: walk to kitchen
walk('kitchen')
# 1: find salmon
find('salmon')
# 2: grab salmon
assert('close' to 'salmon')
    else: find('salmon')
grab('salmon')
# 3: find microwave
find('microwave')
# 4: open microwave
assert('close' to 'microwave' )  
    else: find('microwave')
assert('microwave' is 'closed' )
    else: close('microwave')
open('microwave')
# 5: put salmon in microwave
assert('salmon' in 'hands' )
    else: find('salmon')
    else: grab('salmon')
assert('close' to 'microwave' )  
    else: find('microwave')
assert('microwave' is 'opened' )
    else: open('microwave')
putin('salmon', 'microwave')
# 6: close microwave
assert('close' to 'microwave' )
    else: find('microwave')
assert('microwave' is 'opened' )
    else: open('microwave')
close('microwave')
# 7: start microwave
assert('close' to 'microwave' )  
    else: find('microwave')
assert('microwave' is 'closed' )
    else: close('microwave')
switchon('microwave')
# 8: wait for microwave to finish
# 9: take out salmon from microwave
assert('close' to 'microwave' )
    else: find('microwave')
assert('microwave' is 'switchon' )
    else: switchon('microwave')
switchoff('microwave')
assert('close' to 'microwave' )  
    else: find('microwave')
assert('microwave' is 'closed' )
    else: close('microwave')
open('microwave')
assert('close' to 'salmon')
    else: find('salmon')
grab('salmon')
assert('close' to 'microwave' )
    else: find('microwave')
assert('microwave' is 'opened' )
    else: open('microwave')
close('microwave')
# 10: serve microwaved salmon
# 11: Done

<char0> [walk] <kitchen> (205)
<char0> [find] <salmon> (327)
State check:
You see: salmon, salmon ON microwave.
assert('close' to 'salmon')
True
<char0> [grab] <salmon> (327)
<char0> [find] <microwave> (313)
State check:
You see: microwave is OFF and CLOSED
assert('close' to 'microwave' )
True
State check:
You see: microwave is OFF and CLOSED
assert('microwave' is 'closed' )
True
<char0> [open] <microwave> (313)
State check:
You see: salmon, .  You have salmon.
assert('salmon' in 'hands' )
True
State check:
You see: microwave is OFF and OPEN
assert('close' to 'microwave' )
False
<char0> [find] <microwave> (313)
State check:
You see: microwave is OFF and OPEN
assert('microwave' is 'opened' )
True
<char0> [putin] <salmon> (327) <microwave> (313)
State check:
You see: microwave is OFF and OPEN, salmon INSIDE microwave.
assert('close' to 'microwave' )
False
<char0> [find] <microwave> (313)
State check:
You see: microwave is OFF and OPEN, salmon INSIDE microwave.
assert('microwave' is 'opened' )
True
<char0> [close] <microwave> (313)
State check:
You see: microwave is OFF and CLOSED, salmon INSIDE microwave.
assert('close' to 'microwave' )
True
State check:
You see: microwave is OFF and CLOSED, salmon INSIDE microwave.
assert('microwave' is 'closed' )
True
<char0> [switchon] <microwave> (313)
State check:
You see: microwave is ON and CLOSED, salmon INSIDE microwave.
assert('close' to 'microwave' )
True
State check:
You see: microwave is ON and CLOSED, salmon INSIDE microwave.
assert('microwave' is 'switchon' )
True
<char0> [switchoff] <microwave> (313)
State check:
You see: microwave is OFF and CLOSED, salmon INSIDE microwave.
assert('close' to 'microwave' )
True
State check:
You see: microwave is OFF and CLOSED, salmon INSIDE microwave.
assert('microwave' is 'closed' )
True
<char0> [open] <microwave> (313)
State check:
You see: salmon, salmon INSIDE microwave.
assert('close' to 'salmon')
True
<char0> [grab] <salmon> (327)
State check:
You see: microwave is OFF and OPEN
assert('close' to 'microwave' )
False
<char0> [find] <microwave> (313)
State check:
You see: microwave is OFF and OPEN
assert('microwave' is 'opened' )
True
<char0> [close] <microwave> (313)

--Executing task: watch tv--
Plan:  # 0: walk to living room
walk('livingroom')
# 1: find TV
find('tv')
# 2: turn on TV
switchon('tv')
# 3: watch TV
watch('tv')
# 4: Done

<char0> [walk] <livingroom> (335)
<char0> [find] <tv> (264)
<char0> [switchon] <tv> (264)
<char0> [watch] <tv> (264)
act_success: False, message: <character> (1) does not face <tv> (264) when executing "[WATCH] <tv> (264) [0]"

--Executing task: turn off light--
Plan:  # 0: walk to living room
walk('livingroom')
# 1: find light switch
find('lightswitch')
# 2: switch off the light
assert('close' to 'lightswitch')
    else: find('lightswitch')
switchoff('lightswitch')
# 3: Done

<char0> [walk] <livingroom> (335)
<char0> [find] <lightswitch> (261)
State check:
You see: lightswitch is ON
assert('close' to 'lightswitch')
True
<char0> [switchoff] <lightswitch> (261)

--Executing task: brush teeth--
Plan:  # 0: walk to bathroom
walk('bathroom')
# 1: find toothbrush
find('toothbrush')
# 2: grab toothbrush
assert('close' to 'toothbrush')
    else: find('toothbrush')
grab('toothbrush')
# 3: find toothpaste
find('toothpaste')
# 4: grab toothpaste
assert('close' to 'toothpaste')
    else: find('toothpaste')
grab('toothpaste')
# 5: apply toothpaste on toothbrush
assert('toothbrush' in 'hands')
    else: find('toothbrush')
    else: grab('toothbrush')
assert('toothpaste' in 'hands')
    else: find('toothpaste')
    else: grab('toothpaste')
# 6: start brushing teeth
# 7: rinse mouth
# 8: Done

<char0> [walk] <bathroom> (11)
<char0> [find] <toothbrush> (65)
State check:
You see: toothbrush, toothbrush ON bathroomcounter.
assert('close' to 'toothbrush')
True
<char0> [grab] <toothbrush> (65)
<char0> [find] <toothpaste> (62)
State check:
You see: toothpaste is CLOSED, toothpaste ON bathroomcounter.  You have toothbrush.
assert('close' to 'toothpaste')
True
<char0> [grab] <toothpaste> (62)
State check:
You see: toothbrush, toothbrush.
assert('toothbrush' in 'hands')
False
<char0> [find] <toothbrush> (65)
<char0> [grab] <toothbrush> (65)
act_success: False, message: <character> (1) does not have a free hand when executing "[GRAB] <toothbrush> (65) [0]"
State check:
You see: toothpaste is CLOSED, .  You have toothpaste
assert('toothpaste' in 'hands')
True

--Executing task: throw away apple--
Plan:  # 0: walk to kitchen
walk('kitchen')
# 1: find apple
find('apple')
# 2: grab apple
assert('close' to 'apple')
    else: find('apple')
grab('apple')
# 3: find garbage can
find('garbagecan')
# 4: put apple in garbage can
assert('close' to 'garbagecan' )  
    else: find('garbagecan')
assert('garbagecan' is 'closed' )
    else: close('garbagecan')
open('garbagecan')
assert('apple' in 'hands' )
    else: find('apple')
    else: grab('apple')
assert('close' to 'garbagecan' )  
    else: find('garbagecan')
assert('garbagecan' is 'opened' )
    else: open('garbagecan')
putin('apple', 'garbagecan')
assert('close' to 'garbagecan' )
    else: find('garbagecan')
assert('garbagecan' is 'opened' )
    else: open('garbagecan')
close('garbagecan')
# 5: Done

<char0> [walk] <kitchen> (205)
<char0> [find] <apple> (438)
State check:
You see: apple, apple ON coffeetable.
assert('close' to 'apple')
False
<char0> [find] <apple> (438)
State check:
You see: apple, apple ON coffeetable.
grab('apple')
True  
False  
True  
False  
True  
False  
False
<char0> [grab] <apple> (438)
<char0> [find] <garbagecan> (229)
State check:
You see: garbagecan is CLOSED
assert('close' to 'garbagecan' )
True
State check:
You see: garbagecan is CLOSED
assert('garbagecan' is 'closed' )
True
<char0> [open] <garbagecan> (229)
State check:
You see: apple, .  You have apple.
assert('apple' in 'hands' )
True
State check:
You see: garbagecan is OPEN
assert('close' to 'garbagecan' )
False
<char0> [find] <garbagecan> (229)
State check:
You see: garbagecan is OPEN
assert('garbagecan' is 'opened' )
True
<char0> [putin] <apple> (438) <garbagecan> (229)
State check:
You see: garbagecan is OPEN, apple INSIDE garbagecan.
assert('close' to 'garbagecan' )
False
<char0> [find] <garbagecan> (229)
State check:
You see: garbagecan is OPEN, apple INSIDE garbagecan.
assert('garbagecan' is 'opened' )
True
<char0> [close] <garbagecan> (229)

--Executing task: make toast--
Plan:  # 0: walk to kitchen
walk('kitchen')
# 1: find toaster
find('toaster')
# 2: find bread slice
find('breadslice')
# 3: grab bread slice
assert('close' to 'breadslice')
    else: find('breadslice')
grab('breadslice')
# 4: put bread slice in toaster
assert('breadslice' in 'hands')
    else: find('breadslice')
    else: grab('breadslice')
assert('close' to 'toaster')
    else: find('toaster')
putin('breadslice', 'toaster')
# 5: turn on toaster
assert('close' to 'toaster')
    else: find('toaster')
switchon('toaster')
# 6: wait for toast to be ready
# 7: take toast out of toaster
# 8: Done

<char0> [walk] <kitchen> (205)
<char0> [find] <toaster> (308)
<char0> [find] <breadslice> (310)
State check:
You see: breadslice, breadslice INSIDE toaster.
assert('close' to 'breadslice')
True
<char0> [grab] <breadslice> (310)
State check:
You see: breadslice, .  You have breadslice.
assert('breadslice' in 'hands')
True
State check:
You see: toaster is OFF
assert('close' to 'toaster')
False
<char0> [find] <toaster> (308)
State check:
You see: toaster is OFF
putin('breadslice', 'toaster')
True  
False  
True  
False  
True  
False  
False
<char0> [putin] <breadslice> (310) <toaster> (308)
State check:
You see: toaster is OFF, breadslice INSIDE toaster.
assert('close' to 'toaster')
True
<char0> [switchon] <toaster> (308)

Task: eat chips on the sofa, GT Diff: {'character INSIDE livingroom', 'sofa CLOSE character', 'character ON sofa', 'chips CLOSE character', 'character CLOSE sofa', 'character HOLDS_RH chips', 'character CLOSE chips'}, Pred Diff: {'character INSIDE livingroom', 'sofa CLOSE character', 'character ON sofa', 'chips CLOSE character', 'character CLOSE sofa', 'character HOLDS_RH chips', 'character CLOSE chips'}
Task: put salmon in the fridge, GT Diff: {'character CLOSE fridge', 'fridge CLOSE character', 'character CLOSE floor', 'salmon CLOSE fridge', 'floor CLOSE character', 'fridge CLOSE salmon', 'salmon INSIDE fridge'}, Pred Diff: {'character CLOSE fridge', 'fridge CLOSE character', 'character CLOSE floor', 'salmon CLOSE fridge', 'floor CLOSE character', 'fridge CLOSE salmon', 'salmon INSIDE fridge'}
Task: wash the plate, GT Diff: {'dishwashingliquid CLOSE sink', 'plate CLOSE sink', 'bathroomcounter CLOSE character', 'character INSIDE bathroom', 'sink CLOSE plate', 'character CLOSE bathroomcounter', 'dishwashingliquid INSIDE sink', 'plate INSIDE sink', 'faucet CLOSE character', 'sink CLOSE dishwashingliquid', 'character CLOSE faucet'}, Pred Diff: {'washingsponge INSIDE sink', 'sink CLOSE character', 'character CLOSE sink', 'dishwashingliquid CLOSE sink', 'plate CLOSE sink', 'character CLOSE washingsponge', 'sink CLOSE washingsponge', 'sink CLOSE plate', 'dishwashingliquid INSIDE sink', 'plate INSIDE sink', 'sink CLOSE dishwashingliquid', 'washingsponge CLOSE character', 'washingsponge CLOSE sink'}
Task: bring coffeepot and cupcake to the coffee table, GT Diff: {'coffeetable CLOSE coffeepot', 'cupcake ON coffeetable', 'coffeepot INSIDE bedroom', 'coffeetable CLOSE character', 'cupcake CLOSE coffeetable', 'character CLOSE coffeetable', 'character CLOSE floor', 'coffeetable CLOSE cupcake', 'coffeepot ON coffeetable', 'cupcake CLOSE character', 'character CLOSE coffeepot', 'coffeepot CLOSE coffeetable', 'coffeepot CLOSE character', 'character INSIDE bedroom', 'floor CLOSE character', 'character CLOSE cupcake'}, Pred Diff: {'character HOLDS_RH coffeepot', 'coffeetable CLOSE character', 'coffeepot INSIDE bedroom', 'character INSIDE livingroom', 'character CLOSE coffeetable', 'character HOLDS_LH cupcake', 'cupcake CLOSE character', 'character CLOSE coffeepot', 'coffeepot CLOSE character', 'character CLOSE cupcake'}
Task: microwave salmon, GT Diff: {'character CLOSE toaster', 'character HOLDS_RH salmon', 'toaster CLOSE character'}, Pred Diff: {'character HOLDS_RH salmon'}
Task: watch tv, GT Diff: {'character CLOSE tvstand', 'character INSIDE livingroom', 'tvstand CLOSE character', 'tv CLOSE character', 'character CLOSE tv'}, Pred Diff: {'tvstand CLOSE character', 'character CLOSE tvstand', 'character CLOSE tv', 'tv CLOSE character'}
Task: turn off light, GT Diff: {'character INSIDE bathroom'}, Pred Diff: set()
Task: brush teeth, GT Diff: {'toothpaste CLOSE character', 'character HOLDS_RH toothbrush', 'character CLOSE toothbrush', 'toothbrush CLOSE toothpaste', 'toothpaste INSIDE toothbrush', 'character INSIDE bathroom', 'bathroomcounter CLOSE character', 'character CLOSE bathroomcounter', 'toothpaste CLOSE toothbrush', 'toothbrush CLOSE character', 'character CLOSE toothpaste'}, Pred Diff: {'toothpaste CLOSE character', 'character HOLDS_RH toothbrush', 'character CLOSE toothbrush', 'bathroomcounter CLOSE character', 'character INSIDE bathroom', 'character CLOSE bathroomcounter', 'toothbrush CLOSE character', 'character HOLDS_LH toothpaste', 'character CLOSE toothpaste'}
Task: throw away apple, GT Diff: {'character CLOSE apple', 'apple CLOSE character', 'apple CLOSE garbagecan', 'garbagecan CLOSE character', 'garbagecan CLOSE apple', 'character CLOSE garbagecan', 'apple INSIDE garbagecan'}, Pred Diff: {'character CLOSE apple', 'apple CLOSE character', 'apple CLOSE garbagecan', 'garbagecan CLOSE character', 'garbagecan CLOSE apple', 'character CLOSE garbagecan', 'apple INSIDE garbagecan'}
Task: make toast, GT Diff: {'character CLOSE toaster', 'toaster CLOSE character', 'breadslice CLOSE character', 'character CLOSE breadslice', 'character HOLDS_RH breadslice'}, Pred Diff: {'character CLOSE toaster', 'toaster CLOSE character', 'breadslice CLOSE character', 'toaster CLOSE breadslice', 'character CLOSE breadslice', 'breadslice CLOSE toaster'}