From f052782bc8c848d44d55a5509610262a2a5c7f03 Mon Sep 17 00:00:00 2001 From: nickwalton Date: Mon, 28 Oct 2019 16:06:04 -0600 Subject: [PATCH] update --- data/actions_batch.csv | 4 ++ data/mech_turk_actions1.csv | 9 ++++ data/mech_turk_results1.csv | 5 ++ data/results_batch.csv | 20 ++++++-- data/seed_forest_1.1/apoc_seed1.json | 1 + data/seed_forest_1.1/apoc_seed2.json | 1 + data/seed_forest_1.1/apoc_seed3.json | 1 + data/seed_forest_1.1/apoc_seed4.json | 1 + data/seed_forest_1.2/apoc_seed1.json | 1 + data/seed_forest_1.2/apoc_seed2.json | 1 + data/seed_forest_1.2/apoc_seed3.json | 1 + data/seed_forest_1.2/apoc_seed4.json | 1 + data/storytree.py | 71 ++++++++++++++++++++-------- 13 files changed, 94 insertions(+), 23 deletions(-) create mode 100644 data/mech_turk_actions1.csv create mode 100644 data/mech_turk_results1.csv create mode 100644 data/seed_forest_1.1/apoc_seed1.json create mode 100644 data/seed_forest_1.1/apoc_seed2.json create mode 100644 data/seed_forest_1.1/apoc_seed3.json create mode 100644 data/seed_forest_1.1/apoc_seed4.json create mode 100644 data/seed_forest_1.2/apoc_seed1.json create mode 100644 data/seed_forest_1.2/apoc_seed2.json create mode 100644 data/seed_forest_1.2/apoc_seed3.json create mode 100644 data/seed_forest_1.2/apoc_seed4.json diff --git a/data/actions_batch.csv b/data/actions_batch.csv index 1eda1a3..d0b27f1 100644 --- a/data/actions_batch.csv +++ b/data/actions_batch.csv @@ -1 +1,5 @@ tree_id,path,context,story_block_1,previous_action,story_block_2 +apoc_seed1,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.",eat the crackers.,"They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none." +apoc_seed2,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.,eat a granola bar.,"It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now..." +apoc_seed3,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ",look for something to wrap your chest with.,"There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now..." +apoc_seed4,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ",search the farmhouse for food. ,You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry. diff --git a/data/mech_turk_actions1.csv b/data/mech_turk_actions1.csv new file mode 100644 index 0000000..dfe9cae --- /dev/null +++ b/data/mech_turk_actions1.csv @@ -0,0 +1,9 @@ +"HITId","HITTypeId","Title","Description","Keywords","Reward","CreationTime","MaxAssignments","RequesterAnnotation","AssignmentDurationInSeconds","AutoApprovalDelayInSeconds","Expiration","NumberOfSimilarHITs","LifetimeInSeconds","AssignmentId","WorkerId","AssignmentStatus","AcceptTime","SubmitTime","AutoApprovalTime","ApprovalTime","RejectionTime","RequesterFeedback","WorkTimeInSeconds","LifetimeApprovalRate","Last30DaysApprovalRate","Last7DaysApprovalRate","Input.tree_id","Input.path","Input.context","Input.story_block_1","Input.previous_action","Input.story_block_2","Answer.action_1","Answer.action_2","Approve","Reject" +"36GJS3V78VC9EOT3KW0F6HFMZJ0JGY","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3WLEIWSYHP3PU7O0NJH7GK1WWBV2H6","AYJW7CM50ZKOX","Approved","Mon Oct 28 14:25:00 PDT 2019","Mon Oct 28 14:26:10 PDT 2019","Thu Oct 31 14:26:10 PDT 2019","Mon Oct 28 14:39:33 PDT 2019","","","70","100% (2/2)","100% (2/2)","100% (2/2)","apoc_seed3","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ","look for something to wrap your chest with.","There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...","Check for other injuries.","Look around for ways to make the room warmer." +"36GJS3V78VC9EOT3KW0F6HFMZJ0JGY","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3WLEIWSYHP3PU7O0NJH7GK1WWBV2H6","AYJW7CM50ZKOX","Approved","Mon Oct 28 14:25:00 PDT 2019","Mon Oct 28 14:26:10 PDT 2019","Thu Oct 31 14:26:10 PDT 2019","Mon Oct 28 14:39:33 PDT 2019","","","70","100% (2/2)","100% (2/2)","100% (2/2)","apoc_seed3","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ","look for something to wrap your chest with.","There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...","Check for other injuries.","Look around for ways to make the room warmer." +"3ATYLI1PRTOX61A18FDNBQOOQ5ROJQ","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3P59JYT76M6FZGFVNDYWU34K74MT21","A2Q3FS9G8ITCN7","Approved","Mon Oct 28 14:14:17 PDT 2019","Mon Oct 28 14:17:57 PDT 2019","Thu Oct 31 14:17:57 PDT 2019","Mon Oct 28 14:39:34 PDT 2019","","","220","100% (1/1)","100% (1/1)","100% (1/1)","apoc_seed1","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.","eat the crackers.","They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.","Continue to look for food in the building up ahead.","Look for water for hydration and to fool the stomach until ore food can be found." +"3ATYLI1PRTOX61A18FDNBQOOQ5ROJQ","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3RRCEFRB7NYP6801R5QZNOVWLBH4BH","A3PXCRGJZE1QC3","Approved","Mon Oct 28 14:11:03 PDT 2019","Mon Oct 28 14:13:11 PDT 2019","Thu Oct 31 14:13:11 PDT 2019","Mon Oct 28 14:39:34 PDT 2019","","","128","100% (3/3)","100% (3/3)","100% (3/3)","apoc_seed1","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.","eat the crackers.","They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.","Search the cars for clothing.","Begin to walk towards the nearest town." +"3AFT28WXLFO1BQQVQXSNZP9ODQ2OIE","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3H8DHMCCWAX3Z7NOQT4LPV8SLJNKD0","AYJW7CM50ZKOX","Approved","Mon Oct 28 14:23:04 PDT 2019","Mon Oct 28 14:24:54 PDT 2019","Thu Oct 31 14:24:54 PDT 2019","Mon Oct 28 14:39:33 PDT 2019","","","110","100% (2/2)","100% (2/2)","100% (2/2)","apoc_seed2","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.","eat a granola bar.","It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...","Look for other doors inside the store.","Check to see if there are any batteries in the flashlight." +"3AFT28WXLFO1BQQVQXSNZP9ODQ2OIE","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3ZPPDN2SLWIOAHIXIROG54CXA099EJ","A3PXCRGJZE1QC3","Approved","Mon Oct 28 14:13:12 PDT 2019","Mon Oct 28 14:13:55 PDT 2019","Thu Oct 31 14:13:55 PDT 2019","Mon Oct 28 14:39:34 PDT 2019","","","43","100% (3/3)","100% (3/3)","100% (3/3)","apoc_seed2","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.","eat a granola bar.","It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...","Check to see if the flashlight works.","Check the storage rooms for tools and supplies." +"322ZSN9Z5G6NGBWO1PCIZY5S7GIT4Q","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","32VNZTT0A8QCMFHQN2CPN3003XJ4RT","A3PXCRGJZE1QC3","Approved","Mon Oct 28 14:09:19 PDT 2019","Mon Oct 28 14:11:03 PDT 2019","Thu Oct 31 14:11:03 PDT 2019","Mon Oct 28 14:39:33 PDT 2019","","","104","100% (3/3)","100% (3/3)","100% (3/3)","apoc_seed4","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ","search the farmhouse for food.","You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.","Search the farmhouse for tools and utencils.","Search the farmhouse for other usable supplies." +"322ZSN9Z5G6NGBWO1PCIZY5S7GIT4Q","3PQW4YC2N2S8SNT2DRM4NJQH5GZNUG","Write possible actions in a text adventure.","Given a sequence of actions and results write set of next possible actions","chat, utterance, data collection","$0.05","Mon Oct 28 14:08:59 PDT 2019","2","BatchId:3816528;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 13:08:59 PST 2019","","","3DBQWDE4Y7K930TY80EIJB142XTN5Z","A168GO7JNDTVA8","Approved","Mon Oct 28 14:18:54 PDT 2019","Mon Oct 28 14:19:33 PDT 2019","Thu Oct 31 14:19:33 PDT 2019","Mon Oct 28 14:39:33 PDT 2019","","","39","100% (1/1)","100% (1/1)","100% (1/1)","apoc_seed4","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ","search the farmhouse for food.","You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.","eat meat","eat peas" \ No newline at end of file diff --git a/data/mech_turk_results1.csv b/data/mech_turk_results1.csv new file mode 100644 index 0000000..a7b7786 --- /dev/null +++ b/data/mech_turk_results1.csv @@ -0,0 +1,5 @@ +"HITId","HITTypeId","Title","Description","Keywords","Reward","CreationTime","MaxAssignments","RequesterAnnotation","AssignmentDurationInSeconds","AutoApprovalDelayInSeconds","Expiration","NumberOfSimilarHITs","LifetimeInSeconds","AssignmentId","WorkerId","AssignmentStatus","AcceptTime","SubmitTime","AutoApprovalTime","ApprovalTime","RejectionTime","RequesterFeedback","WorkTimeInSeconds","LifetimeApprovalRate","Last30DaysApprovalRate","Last7DaysApprovalRate","Input.tree_id","Input.path","Input.context","Input.story_block_1","Input.previous_action_1","Input.story_block_2","Input.previous_action_2","Answer.result","Approve","Reject" +"3YD0MU1NC2NFK2FYXNJ875ZAATFA7Y","31IV7WI13C8ZXCHC9SJJAN15KNXH5J","Write a short text adventure.","Write possible actions in a text adventure.","chat, utterance, data collection","$0.05","Mon Oct 28 12:52:37 PDT 2019","1","BatchId:3816407;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 11:52:37 PST 2019","","","3Z2R0DQ0JI0DAXXYXI91VH4J4UD2EY","AYXXMHLZRAPF9","Submitted","Mon Oct 28 13:04:05 PDT 2019","Mon Oct 28 13:05:41 PDT 2019","Thu Oct 31 13:05:41 PDT 2019","","","","96","0% (0/0)","0% (0/0)","0% (0/0)","apoc_seed1","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You search the gas station for food, but find nothing you can eat.","search the cars for food.","You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.","eat the crackers.","They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none." +"3DIIW4IV8PHX7XGD7DDELR3JWZUI4Q","31IV7WI13C8ZXCHC9SJJAN15KNXH5J","Write a short text adventure.","Write possible actions in a text adventure.","chat, utterance, data collection","$0.05","Mon Oct 28 12:52:37 PDT 2019","1","BatchId:3816407;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 11:52:37 PST 2019","","","3X31TUMD7Y8KRIPUV0WR3TKYLLZ1L2","AYXXMHLZRAPF9","Submitted","Mon Oct 28 13:00:14 PDT 2019","Mon Oct 28 13:03:48 PDT 2019","Thu Oct 31 13:03:48 PDT 2019","","","","214","0% (0/0)","0% (0/0)","0% (0/0)","apoc_seed2","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You drive around the town and see many boarded up buildings, but no people. Eventually you find a store that you think might have supplies.","go inside the store and see if there are any supplies.","It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.","eat a granola bar.","It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now..." +"31J7RYECZLCI5ZR05YRPF9O81JEL1U","31IV7WI13C8ZXCHC9SJJAN15KNXH5J","Write a short text adventure.","Write possible actions in a text adventure.","chat, utterance, data collection","$0.05","Mon Oct 28 12:52:37 PDT 2019","1","BatchId:3816407;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 11:52:37 PST 2019","","","3EA3QWIZ4JHJA1TXCGJOHJB1W0XITF","AYXXMHLZRAPF9","Submitted","Mon Oct 28 13:05:42 PDT 2019","Mon Oct 28 13:07:04 PDT 2019","Thu Oct 31 13:07:04 PDT 2019","","","","82","0% (0/0)","0% (0/0)","0% (0/0)","apoc_seed3","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You run forward to attack the man. His crowbar crashes into your chest and you fall to the ground. He kicks you a few times and then grabs your granola bars and runs off.","go after him.","You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ","look for something to wrap your chest with.","There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now..." +"30Z7M1Q8UY6JKGKH7SBEL5V5LDLA8L","31IV7WI13C8ZXCHC9SJJAN15KNXH5J","Write a short text adventure.","Write possible actions in a text adventure.","chat, utterance, data collection","$0.05","Mon Oct 28 12:52:37 PDT 2019","1","BatchId:3816407;OriginalHitTemplateId:928390845;","300","259200","Mon Nov 04 11:52:37 PST 2019","","","3A1COHJ8NKH0GMQP30Q8QBEZIA68HW","A2SU4BLYQCSA46","Submitted","Mon Oct 28 13:37:10 PDT 2019","Mon Oct 28 13:39:54 PDT 2019","Thu Oct 31 13:39:54 PDT 2019","","","","164","0% (0/0)","0% (0/0)","0% (0/0)","apoc_seed4","000","Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind.","You try to open the farmhouse front door, but it's locked. There's a broken window on the right and a shed behind the house.","go through the window into the farmhouse.","You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ","search the farmhouse for food.","You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry." \ No newline at end of file diff --git a/data/results_batch.csv b/data/results_batch.csv index e4efc83..ba24615 100644 --- a/data/results_batch.csv +++ b/data/results_batch.csv @@ -1,5 +1,17 @@ tree_id,path,context,story_block_1,previous_action_1,story_block_2,previous_action_2 -apoc_seed1,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You search the gas station for food, but find nothing you can eat.",search the cars for food.,"You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.",eat the crackers. -apoc_seed2,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You drive around the town and see many boarded up buildings, but no people. Eventually you find a store that you think might have supplies.",go inside the store and see if there are any supplies.,It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.,eat a granola bar. -apoc_seed3,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,You run forward to attack the man. His crowbar crashes into your chest and you fall to the ground. He kicks you a few times and then grabs your granola bars and runs off.,go after him.,"You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ",look for something to wrap your chest with. -apoc_seed4,000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You try to open the farmhouse front door, but it's locked. There's a broken window on the right and a shed behind the house.",go through the window into the farmhouse. ,"You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ",search the farmhouse for food. +apoc_seed1,0000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.",eat the crackers.,"They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.",Continue to look for food in the building up ahead. +apoc_seed1,0001,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.",eat the crackers.,"They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.",Look for water for hydration and to fool the stomach until ore food can be found. +apoc_seed1,0002,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.",eat the crackers.,"They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.",Search the cars for clothing. +apoc_seed1,0003,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.",eat the crackers.,"They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.",Begin to walk towards the nearest town. +apoc_seed2,0000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.,eat a granola bar.,"It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...",Look for other doors inside the store. +apoc_seed2,0001,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.,eat a granola bar.,"It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...",Check to see if there are any batteries in the flashlight. +apoc_seed2,0002,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.,eat a granola bar.,"It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...",Check to see if the flashlight works. +apoc_seed2,0003,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.,eat a granola bar.,"It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...",Check the storage rooms for tools and supplies. +apoc_seed3,0000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ",look for something to wrap your chest with.,"There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...",Check for other injuries. +apoc_seed3,0001,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ",look for something to wrap your chest with.,"There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...",Look around for ways to make the room warmer. +apoc_seed3,0002,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ",look for something to wrap your chest with.,"There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...",Check for other injuries. +apoc_seed3,0003,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ",look for something to wrap your chest with.,"There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...",Look around for ways to make the room warmer. +apoc_seed4,0000,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ",search the farmhouse for food. ,You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.,Search the farmhouse for tools and utencils. +apoc_seed4,0001,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ",search the farmhouse for food. ,You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.,Search the farmhouse for other usable supplies. +apoc_seed4,0002,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ",search the farmhouse for food. ,You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.,eat meat +apoc_seed4,0003,Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ,"You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ",search the farmhouse for food. ,You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.,eat peas diff --git a/data/seed_forest_1.1/apoc_seed1.json b/data/seed_forest_1.1/apoc_seed1.json new file mode 100644 index 0000000..00f3aa3 --- /dev/null +++ b/data/seed_forest_1.1/apoc_seed1.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed1", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "You are standing outside an old rundown gas station at the edge of town. There are old broken cars surrounding the gas station and on the road. You are extremely hungry and haven't eaten in a few days. ", "action_results": [{"action": "look in the gas station for food. ", "result": "You search the gas station for food, but find nothing you can eat.", "action_results": [{"action": "search the cars for food.", "result": "You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.", "action_results": [{"action": "eat the crackers.", "result": "They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.", "action_results": []}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.1/apoc_seed2.json b/data/seed_forest_1.1/apoc_seed2.json new file mode 100644 index 0000000..33060b6 --- /dev/null +++ b/data/seed_forest_1.1/apoc_seed2.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed2", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "You find a car with the keys in the ignition and try to start it. Nothing happens. You keep looking and find another car that looks like it might work. You manage to get the engine started. ", "action_results": [{"action": "drive around looking for any people or stores that might have supplies.", "result": "You drive around the town and see many boarded up buildings, but no people. Eventually you find a store that you think might have supplies.", "action_results": [{"action": "go inside the store and see if there are any supplies.", "result": "It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.", "action_results": [{"action": "eat a granola bar.", "result": "It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...", "action_results": []}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.1/apoc_seed3.json b/data/seed_forest_1.1/apoc_seed3.json new file mode 100644 index 0000000..8caa028 --- /dev/null +++ b/data/seed_forest_1.1/apoc_seed3.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed3", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "As you leave the store you notice movement out behind your car. A man steps out with a hungry look in his eyes. His clothes are in tatters and he is carrying a crowbar.", "action_results": [{"action": "run at the man and attack him.", "result": "You run forward to attack the man. His crowbar crashes into your chest and you fall to the ground. He kicks you a few times and then grabs your granola bars and runs off.", "action_results": [{"action": "go after him.", "result": "You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ", "action_results": [{"action": "look for something to wrap your chest with.", "result": "There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...", "action_results": []}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.1/apoc_seed4.json b/data/seed_forest_1.1/apoc_seed4.json new file mode 100644 index 0000000..3c328b6 --- /dev/null +++ b/data/seed_forest_1.1/apoc_seed4.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed4", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a farmhouse to your right and a forest on your left. ", "action_results": [{"action": "go in the farmhouse and look for food.", "result": "You try to open the farmhouse front door, but it's locked. There's a broken window on the right and a shed behind the house.", "action_results": [{"action": "go through the window into the farmhouse. ", "result": "You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ", "action_results": [{"action": "search the farmhouse for food. ", "result": "You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.", "action_results": []}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.2/apoc_seed1.json b/data/seed_forest_1.2/apoc_seed1.json new file mode 100644 index 0000000..8873a05 --- /dev/null +++ b/data/seed_forest_1.2/apoc_seed1.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed1", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "You are standing outside an old rundown gas station at the edge of town. There are old broken cars surrounding the gas station and on the road. You are extremely hungry and haven't eaten in a few days. ", "action_results": [{"action": "look in the gas station for food. ", "result": "You search the gas station for food, but find nothing you can eat.", "action_results": [{"action": "search the cars for food.", "result": "You search the cars for food, you search three without success, but in the glove compartment of the fourth you find a box of crackers.", "action_results": [{"action": "eat the crackers.", "result": "They remind you of when you needed to eat a bland diet after your operation. You pat yourself on where you remember the incision was made. The scar healed long ago, but the brain remembers. The crackers weren't very nutritious, but some fuel in the tank is better than none.", "action_results": [{"action": "Continue to look for food in the building up ahead.", "result": null, "action_results": []}, {"action": "Look for water for hydration and to fool the stomach until ore food can be found.", "result": null, "action_results": []}, {"action": "Search the cars for clothing.", "result": null, "action_results": []}, {"action": "Begin to walk towards the nearest town.", "result": null, "action_results": []}]}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.2/apoc_seed2.json b/data/seed_forest_1.2/apoc_seed2.json new file mode 100644 index 0000000..984ec0f --- /dev/null +++ b/data/seed_forest_1.2/apoc_seed2.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed2", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "You find a car with the keys in the ignition and try to start it. Nothing happens. You keep looking and find another car that looks like it might work. You manage to get the engine started. ", "action_results": [{"action": "drive around looking for any people or stores that might have supplies.", "result": "You drive around the town and see many boarded up buildings, but no people. Eventually you find a store that you think might have supplies.", "action_results": [{"action": "go inside the store and see if there are any supplies.", "result": "It looks like the store has been ransacked and all the shelves are empty. You manage to find a package of granola bars and a flashlight behind the counter.", "action_results": [{"action": "eat a granola bar.", "result": "It tastes just like a granola bar you enjoyed when you were younger. In an instant, you are transported to a school hiking trip. Your mind is awash by the mountain air and the bundles of sticks and leaves that formed the trail. Those days seem so long ago now...", "action_results": [{"action": "Look for other doors inside the store.", "result": null, "action_results": []}, {"action": "Check to see if there are any batteries in the flashlight.", "result": null, "action_results": []}, {"action": "Check to see if the flashlight works.", "result": null, "action_results": []}, {"action": "Check the storage rooms for tools and supplies.", "result": null, "action_results": []}]}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.2/apoc_seed3.json b/data/seed_forest_1.2/apoc_seed3.json new file mode 100644 index 0000000..1ccfee6 --- /dev/null +++ b/data/seed_forest_1.2/apoc_seed3.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed3", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "As you leave the store you notice movement out behind your car. A man steps out with a hungry look in his eyes. His clothes are in tatters and he is carrying a crowbar.", "action_results": [{"action": "run at the man and attack him.", "result": "You run forward to attack the man. His crowbar crashes into your chest and you fall to the ground. He kicks you a few times and then grabs your granola bars and runs off.", "action_results": [{"action": "go after him.", "result": "You go after him. As you try and stand up though you realize you're in extreme pain. You think one of your ribs is broken. You manage to get yourself on your feet, but realize catching him is impossible. ", "action_results": [{"action": "look for something to wrap your chest with.", "result": "There's nothing around, so you resort to taking off your pants and wrapping it around your chest. There's a mild draft right now...", "action_results": [{"action": "Check for other injuries.", "result": null, "action_results": []}, {"action": "Look around for ways to make the room warmer.", "result": null, "action_results": []}, {"action": "Check for other injuries.", "result": null, "action_results": []}, {"action": "Look around for ways to make the room warmer.", "result": null, "action_results": []}]}]}]}]} \ No newline at end of file diff --git a/data/seed_forest_1.2/apoc_seed4.json b/data/seed_forest_1.2/apoc_seed4.json new file mode 100644 index 0000000..7baae87 --- /dev/null +++ b/data/seed_forest_1.2/apoc_seed4.json @@ -0,0 +1 @@ +{"tree_id": "apoc_seed4", "context": "Long ago the bombs fell and the world ended. You are one of the few who is still alive. You are trying to survive by scavenging among the ruins of what is left behind. ", "first_story_block": "You walk for two hours and take a break. You've left the town you were in and are now in a more rural area. There's a farmhouse to your right and a forest on your left. ", "action_results": [{"action": "go in the farmhouse and look for food.", "result": "You try to open the farmhouse front door, but it's locked. There's a broken window on the right and a shed behind the house.", "action_results": [{"action": "go through the window into the farmhouse. ", "result": "You break the rest of the glass in the window and try to carefully crawl through. You cut yourself on the edges as you're climbing in, but you make it inside. ", "action_results": [{"action": "search the farmhouse for food. ", "result": "You find meat in the fridge that looks like it's gone bad. You also find a can of peas in the bottom of the pantry.", "action_results": [{"action": "Search the farmhouse for tools and utencils.", "result": null, "action_results": []}, {"action": "Search the farmhouse for other usable supplies.", "result": null, "action_results": []}, {"action": "eat meat", "result": null, "action_results": []}, {"action": "eat peas", "result": null, "action_results": []}]}]}]}]} \ No newline at end of file diff --git a/data/storytree.py b/data/storytree.py index 1643da1..5c29bf5 100644 --- a/data/storytree.py +++ b/data/storytree.py @@ -135,6 +135,15 @@ def load_tree(filename): tree = json.load(fp) return tree +def load_forest(forest_name): + + files = os.listdir("./" + forest_name) + forest = [] + for file in files: + forest.append(load_tree("./" + forest_name + "/" + file)) + return forest + + def csv_to_dict(file): update_dict = {} field_names = [] @@ -154,29 +163,53 @@ def csv_to_dict(file): return update_dict -def update_tree(tree_file, update_file, type="action"): - # TODO need to write this and figure out batch files more clearly - # Batches should keep track of paths so it's easier to go back in and update them. - +def update_forest_with_results(forest_name, update_file): update_dict = csv_to_dict(update_file) + tree_dict = {} + tree_filenames = os.listdir("./" + forest_name) - print("done") + for file_name in tree_filenames: + tree = load_tree("./" + forest_name + "/" + file_name) + tree_dict[tree["tree_id"]] = tree + + for i in range(len(update_dict["Input.tree_id"])): + tree = tree_dict[update_dict["Input.tree_id"][i]] + current_action_results = tree + for choice in update_dict["Input.path"][i]: + choice_num = int(choice) + current_action_results = current_action_results["action_results"][choice_num] + + current_action_results["result"] = update_dict["Answer.result"][i] + + return tree_dict.values() + +def update_forest_with_actions(forest_name, update_file): + update_dict = csv_to_dict(update_file) + tree_dict = {} + tree_filenames = os.listdir("./" + forest_name) + + for file_name in tree_filenames: + tree = load_tree("./" + forest_name + "/" + file_name) + tree_dict[tree["tree_id"]] = tree + + for i in range(len(update_dict["Input.tree_id"])): + tree = tree_dict[update_dict["Input.tree_id"][i]] + current_action_results = tree + for choice in update_dict["Input.path"][i]: + choice_num = int(choice) + current_action_results = current_action_results["action_results"][choice_num] -# tree = dungeon_data_to_tree("./data_nick_1.csv") -# tree["context"] = "The world has ended. The cities are in ruin and few people are left alive." -# make_write_results_batch(tree, "batch.csv") + current_action_results["action_results"].append( + {"action": update_dict["Answer.action_1"][i] ,"result": None , "action_results":[]}) + current_action_results["action_results"].append( + {"action": update_dict["Answer.action_2"][i], "result": None, "action_results": []}) + + return tree_dict.values() + # -# save_tree(tree, "tree_data.json") -# data = load_tree("tree_data.json") -# tree = dungeon_data_to_tree("./manual_data.csv") -# tree["context"] = "The world has ended. The cities are in ruin and few people are left alive." -# make_write_actions_batch(tree, "actions_batch.csv") -# make_write_results_batch(tree, "results_batch.csv") - -forest = data_to_forest("./ai_dungeon_seed.csv") -save_forest(forest, "seed_forest_1") -make_write_actions_batch(forest, "actions_batch.csv") -make_write_results_batch(forest, "results_batch.csv") +new_forest = update_forest_with_actions("seed_forest_1.1", "./mech_turk_actions1.csv") +save_forest(new_forest, "seed_forest_1.2") +make_write_results_batch(new_forest, "results_batch.csv") print("Done")