This commit is contained in:
Nick Walton
2019-11-18 23:26:04 -07:00
parent 95f8acbaff
commit a4f9dfbc10
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import numpy as np
class GPT2Generator:
def __init__(self, generate_num=48, temperature=0.4, top_k=40, top_p=0.9):
def __init__(self, generate_num=42, temperature=0.3, top_k=40, top_p=0.9):
self.generate_num=generate_num
self.temp = temperature
self.top_k = top_k
+1 -1
View File
@@ -17,7 +17,7 @@ def penalize_used(logits, output):
return tf.compat.v1.where(
bool_tensor,
logits / 1.2,
logits / 1.15,
logits)
+3 -3
View File
@@ -42,9 +42,9 @@ def select_game():
def instructions():
text = "AI Dungeon 2 Instructions:"
text += '\n* Enter actions starting with a verb ex. "go to the place" or "attack the orc"'
text += '\n* Just press enter with no action if you want to let the story continue.'
text += '\n* Enter "restart" for any action to end your game and start a new one'
text += '\n* Enjoy!'
text += '\n* If you want to say something then enter \'say "(thing you want to say)"\''
text += '\n* You can also just press enter with no action if you want to let the story continue.'
text += '\n* Finally if you want to end your game and start a new one just enter "restart" for any action. '
return text
def play_aidungeon_2():
+2 -2
View File
@@ -1,9 +1,9 @@
prompts:
classic: "You enter a dungeon with your trusty sword and shield. You are searching for the evil necromancer who killed your family. You've heard that he resides at the bottom of the dungeon, guarded by legions of the undead. You enter the first door and see "
hospital: "You wake up in an old rundown hospital with no memory of how you got there. You look around and see "
hospital: "You wake up in an old rundown hospital with no memory of how you got there. You take a look around the room. "
peasant: "You were kicked out of your home and have set out to see if you can find work in the next town. You step onto the road and see "
peasant: "You were kicked out of your home and have set out to see if you can find work in the next town. You step onto the road and look around you. "
apocalypse: "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. You look around you and see "