kwabs22 commited on
Commit
c0c1626
·
1 Parent(s): f49bae8

Prompt Engineering steps placeholders

Browse files
Files changed (2) hide show
  1. app.py +23 -16
  2. relatively_constant_variables.py +150 -1
app.py CHANGED
@@ -757,17 +757,32 @@ with gr.Blocks() as demo:
757
  gr.HTML("Current Assited workflow idea - Story timeline events suggestions (LLM / Premade List) | Merging events with premade mermaid structures (LLM + Story Text + Mermaid Text) | Edit mermaid till satisfied (LLM + Story Text) | Ask LLM to convert to config (LLM + JSON Text) | Edit config (LLM / User with format assistance or not) | Playtest and go back to mermaaid or config if there are problems")
758
  gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
759
  gr.HTML("Things that can change the workflow - Asset First (Make Asset and make the transitions using LLM), Export First (Custom JS config, Playcanvas, Unreal Engine reverse engineered to this spaces config?) Game Mechanics First (eg. Player Stats, Inventory and NPCS not implemented yet, so traversal type games best aka graph like structures)")
760
- with gr.Accordion("Old Ideas to merge"):
 
 
 
 
 
 
 
 
 
761
  gr.HTML("Random Scenario / Song to 'full game' manual or auto is end goal ")
762
- gr.HTML("Main Priority is to make rails for the story to work on as a simplified view of a game is a linear path with loops (gameplay mechanics) <br> Below = Manual Edit (At bottom you can save the changes and copy it to test) <br>For LLM edit copy either the Timeline")
763
- gr.HTML("The problem is the assets generation is slow and using spaces as api can also clog them (I dont know how to check when ZeroGPUs are at lowest usage historically) so using iFrame is better for now <br> So worklfow -- Make Skeleton -- Use Iframe to get media -- then ask for details / story / gameplay loop ideas and add back to config")
764
- gr.HTML("Timeline for making Timelines?")
765
  gr.HTML("Componets (outside Code Support for Config): Decisions (and context explanation), Nested Sections, Media (Especially to affect decisions), Replayability (GTA and Tekken type mechanics in text form), Theme integration (Modified Varibles that affect UI or config order)")
766
  gr.HTML("Existing Games eg. GTA Heists - Same Map with overlapping branching narratives, Battlefront - Elites amongst Commoners, Tekken Casino (one mistake = 1/2 or 1/3 of your Resources) and Turn based: 'Tactics' type nintendo games, Chess (and any other tile based game) ")
767
  gr.HTML("Existing Game Rules for text - Cyberpunk RED, ")
768
  gr.HTML("Community playthrough = Tally of players choices, Random item placed in a random location - first person to get it wins, Survival by location or characters met")
769
  gr.HTML("Some Kinds of game skeletons ideas - Timelines, Graph as State machine paths, Economy ecosystem")
770
  gr.HTML("One prompt to be used to test models - <br>Please make 10 python lists for the types of media files and their purposes in a game and then use those lists to random generate a timeline of 20 items when the function is called <br>Great next suggest ways to improve this function to create better timelines")
 
 
 
 
 
 
 
 
 
771
 
772
  with gr.Accordion("Qwen 0.5B as Space Guide Tests", open=False):
773
  with gr.Tab("General FAQ Attempt"):
@@ -899,16 +914,6 @@ Implementing more consequences for player actions
899
  Expanding descriptions to create a richer narrative
900
  Incorporating media elements
901
  Creating more diverse paths through the game""")
902
-
903
- with gr.Tab("Main areas of considerations"):
904
- with gr.Tab("Mermaid Graphs and Nesting"):
905
- gr.HTML("Claude Artifacts to illustrate nested structure brainstorms - <br> https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e <br> https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false <br> ")
906
- gr.HTML("")
907
- with gr.Tab("Structural Inspirations"):
908
- gr.HTML("GTA Heists - Replayability and stakes, Tekken - 2/3 mistakes = lost round ")
909
- gr.HTML("Sports Scores, ")
910
- with gr.Tab("Themes"):
911
- gr.HTML("")
912
 
913
  # import originalconfigatbeinningofthisspace, claude3_5_06072024configtips, tipsupdatedconfigatbeinningofthisspace from relatively_constant_variables
914
 
@@ -978,7 +983,9 @@ Creating more diverse paths through the game""")
978
  gr.HTML("Placeholder for Config parser to allow for current zerospace creation and placement into the config (LLM can give list of media but still have to figure out workflow from there)")
979
 
980
  gr.HTML("Placeholder for clearing uploaded assets (public space and temporary persistence = sharing and space problems)")
981
-
 
 
982
  with gr.Tab("Test and Edit Config"):
983
  gr.HTML("The main issue is frequent changes add more chances for bugs in how - manual and auto refer mainly to ensuring correct JSON format ")
984
  with gr.Tab("Full Manual - Test Example State Machine"):
@@ -1363,7 +1370,7 @@ Creating more diverse paths through the game""")
1363
  with gr.Tab("Backend and/or Hosting?"):
1364
  gr.HTML("Deployemnt options - https://huggingface.co/SpacesExamples", "https://huggingface.co/templates")
1365
  gr.HTML("Prototyping and freemium <br>free api <br>HF Pro subscription")
1366
- gr.HTML("GPU (Data privacy) = No Rate limits? - https://replicate.com/pricing, https://lambdalabs.com/service/gpu-cloud https://huggingface.co/pricing#endpoints https://tensordock.com/cloud-gpus")
1367
  gr.HTML("Speed - Groq, SambaNova, https://www.etched.com/announcing-etched ")
1368
  gr.HTML("Price - Coding - https://aider.chat/docs/leaderboards/ - https://www.deepseek.com/ 0.3 per million - is this per token or chinese character as that means converting code to chinese if possible can save api cost?")
1369
  with gr.Tab("Asset loading test"):
 
757
  gr.HTML("Current Assited workflow idea - Story timeline events suggestions (LLM / Premade List) | Merging events with premade mermaid structures (LLM + Story Text + Mermaid Text) | Edit mermaid till satisfied (LLM + Story Text) | Ask LLM to convert to config (LLM + JSON Text) | Edit config (LLM / User with format assistance or not) | Playtest and go back to mermaaid or config if there are problems")
758
  gr.HTML("Interactive movie (UI interaction or no progress) vs Branching Paths (Maze)")
759
  gr.HTML("Things that can change the workflow - Asset First (Make Asset and make the transitions using LLM), Export First (Custom JS config, Playcanvas, Unreal Engine reverse engineered to this spaces config?) Game Mechanics First (eg. Player Stats, Inventory and NPCS not implemented yet, so traversal type games best aka graph like structures)")
760
+ with gr.Accordion("Prompt Engineering as basis for ideation process"):
761
+ gr.HTML("Can use song lyrics as thematic source")
762
+ gr.HTML("Placeholder for each below prompt getting a Textbox")
763
+ gr.HTML("""Write a 3 sentence story
764
+ Great, Lets rewrite the story (keep as much of it as possible) with F1 as our thematic source
765
+ Great, Next for each sentence make decisions for a player in a text game""")
766
+
767
+ gr.HTML("Config writing = Remix old one, Ask LLM to make one, Endless combination testing using the prompt engineering above or writing by hand (prompt engineering on yourself)")
768
+
769
+ with gr.Accordion("Old Ideas to merge", open=False):
770
  gr.HTML("Random Scenario / Song to 'full game' manual or auto is end goal ")
 
 
 
771
  gr.HTML("Componets (outside Code Support for Config): Decisions (and context explanation), Nested Sections, Media (Especially to affect decisions), Replayability (GTA and Tekken type mechanics in text form), Theme integration (Modified Varibles that affect UI or config order)")
772
  gr.HTML("Existing Games eg. GTA Heists - Same Map with overlapping branching narratives, Battlefront - Elites amongst Commoners, Tekken Casino (one mistake = 1/2 or 1/3 of your Resources) and Turn based: 'Tactics' type nintendo games, Chess (and any other tile based game) ")
773
  gr.HTML("Existing Game Rules for text - Cyberpunk RED, ")
774
  gr.HTML("Community playthrough = Tally of players choices, Random item placed in a random location - first person to get it wins, Survival by location or characters met")
775
  gr.HTML("Some Kinds of game skeletons ideas - Timelines, Graph as State machine paths, Economy ecosystem")
776
  gr.HTML("One prompt to be used to test models - <br>Please make 10 python lists for the types of media files and their purposes in a game and then use those lists to random generate a timeline of 20 items when the function is called <br>Great next suggest ways to improve this function to create better timelines")
777
+ with gr.Tab("Main areas of considerations"):
778
+ with gr.Tab("Mermaid Graphs and Nesting"):
779
+ gr.HTML("Claude Artifacts to illustrate nested structure brainstorms - <br> https://claude.site/artifacts/4a910d81-1541-49f4-8531-4f27fe56cd1e <br> https://claude.site/artifacts/265e9242-2093-46e1-9011-ed6ad938be90?fullscreen=false <br> ")
780
+ gr.HTML("")
781
+ with gr.Tab("Structural Inspirations"):
782
+ gr.HTML("GTA Heists - Replayability and stakes, Tekken - 2/3 mistakes = lost round ")
783
+ gr.HTML("Sports Scores, ")
784
+ with gr.Tab("Themes"):
785
+ gr.HTML("")
786
 
787
  with gr.Accordion("Qwen 0.5B as Space Guide Tests", open=False):
788
  with gr.Tab("General FAQ Attempt"):
 
914
  Expanding descriptions to create a richer narrative
915
  Incorporating media elements
916
  Creating more diverse paths through the game""")
 
 
 
 
 
 
 
 
 
 
917
 
918
  # import originalconfigatbeinningofthisspace, claude3_5_06072024configtips, tipsupdatedconfigatbeinningofthisspace from relatively_constant_variables
919
 
 
983
  gr.HTML("Placeholder for Config parser to allow for current zerospace creation and placement into the config (LLM can give list of media but still have to figure out workflow from there)")
984
 
985
  gr.HTML("Placeholder for clearing uploaded assets (public space and temporary persistence = sharing and space problems)")
986
+ with gr.Accordion("My Previous Quick Config Attempts", open=False):
987
+ for experimetal_config_name, experimetal_config in ExampleGameConfigs.items():
988
+ gr.Code(experimetal_config, label=experimetal_config_name)
989
  with gr.Tab("Test and Edit Config"):
990
  gr.HTML("The main issue is frequent changes add more chances for bugs in how - manual and auto refer mainly to ensuring correct JSON format ")
991
  with gr.Tab("Full Manual - Test Example State Machine"):
 
1370
  with gr.Tab("Backend and/or Hosting?"):
1371
  gr.HTML("Deployemnt options - https://huggingface.co/SpacesExamples", "https://huggingface.co/templates")
1372
  gr.HTML("Prototyping and freemium <br>free api <br>HF Pro subscription")
1373
+ gr.HTML("GPU (Data privacy) = No Rate limits? - https://replicate.com/pricing, https://lambdalabs.com/service/gpu-cloud https://huggingface.co/pricing#endpoints https://tensordock.com/cloud-gpus", "https://massedcompute.com/home/pricing/" )
1374
  gr.HTML("Speed - Groq, SambaNova, https://www.etched.com/announcing-etched ")
1375
  gr.HTML("Price - Coding - https://aider.chat/docs/leaderboards/ - https://www.deepseek.com/ 0.3 per million - is this per token or chinese character as that means converting code to chinese if possible can save api cost?")
1376
  with gr.Tab("Asset loading test"):
relatively_constant_variables.py CHANGED
@@ -1257,10 +1257,159 @@ mermaidstorystructures = {
1257
  """,
1258
  }
1259
 
1260
-
1261
  #-------------------------#-------------------------#-------------------------#-------------------------
1262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1263
 
 
1264
 
1265
  #-------------------------#-------------------------#-------------------------#-------------------------
1266
 
 
1257
  """,
1258
  }
1259
 
 
1260
  #-------------------------#-------------------------#-------------------------#-------------------------
1261
 
1262
+ ExampleGameConfigs = {
1263
+ "Racinggametest": {
1264
+ "pitLane": {
1265
+ "start": {
1266
+ "description": "You're in the pit lane of a famous racing circuit. There's buzz about a legendary race coming up.",
1267
+ "choices": [
1268
+ "check car",
1269
+ "talk to crew",
1270
+ "rest"
1271
+ ],
1272
+ "transitions": {
1273
+ "check car": "pitLane_carPrep",
1274
+ "talk to crew": "pitLane_crewInfo",
1275
+ "rest": "pitLane_start"
1276
+ },
1277
+ "consequences": {
1278
+ "check car": {}
1279
+ },
1280
+ "media": []
1281
+ },
1282
+ "crewInfo": {
1283
+ "description": "Your crew tells you about the challenging track and the fierce competition.",
1284
+ "choices": [
1285
+ "start preparations",
1286
+ "ignore advice"
1287
+ ],
1288
+ "transitions": {
1289
+ "start preparations": "pitLane_carPrep",
1290
+ "ignore advice": "pitLane_start"
1291
+ },
1292
+ "consequences": {
1293
+ "start preparations": {}
1294
+ },
1295
+ "media": []
1296
+ },
1297
+ "carPrep": {
1298
+ "description": "You and your crew prepare the car for the race.",
1299
+ "choices": [
1300
+ "head to grid",
1301
+ "more tuning"
1302
+ ],
1303
+ "transitions": {
1304
+ "head to grid": "track_startingGrid",
1305
+ "more tuning": "pitLane_start"
1306
+ },
1307
+ "media": []
1308
+ }
1309
+ },
1310
+ "track": {
1311
+ "startingGrid": {
1312
+ "description": "You're on the starting grid. The atmosphere is tense as drivers prepare for the race.",
1313
+ "choices": [
1314
+ "start race",
1315
+ "return to pit"
1316
+ ],
1317
+ "transitions": {
1318
+ "start race": "track_firstLap",
1319
+ "return to pit": "pitLane_start"
1320
+ },
1321
+ "media": []
1322
+ },
1323
+ "firstLap": {
1324
+ "description": "The race begins! You navigate through the first lap, jostling for position.",
1325
+ "choices": [
1326
+ "overtake",
1327
+ "maintain position"
1328
+ ],
1329
+ "transitions": {
1330
+ "overtake": "track_midRace",
1331
+ "maintain position": "track_midRace"
1332
+ },
1333
+ "media": []
1334
+ },
1335
+ "midRace": {
1336
+ "description": "You're in the middle of the race, facing challenges and making split-second decisions.",
1337
+ "choices": [
1338
+ "push harder",
1339
+ "conserve tires"
1340
+ ],
1341
+ "transitions": {
1342
+ "push harder": "track_finalLaps",
1343
+ "conserve tires": "track_finalLaps"
1344
+ },
1345
+ "media": []
1346
+ },
1347
+ "finalLaps": {
1348
+ "description": "The final laps approach. Victory is within reach, but so is the risk of a mistake.",
1349
+ "choices": [
1350
+ "give it all",
1351
+ "play it safe"
1352
+ ],
1353
+ "transitions": {
1354
+ "give it all": "track_finishLine",
1355
+ "play it safe": "track_finishLine"
1356
+ },
1357
+ "consequences": {
1358
+ "give it all": {}
1359
+ },
1360
+ "media": []
1361
+ },
1362
+ "finishLine": {
1363
+ "description": "You cross the finish line! The results are in.",
1364
+ "choices": [
1365
+ "check results",
1366
+ "return to pit"
1367
+ ],
1368
+ "transitions": {
1369
+ "check results": "podium_ceremony",
1370
+ "return to pit": "pitLane_start"
1371
+ },
1372
+ "media": []
1373
+ }
1374
+ },
1375
+ "podium": {
1376
+ "ceremony": {
1377
+ "description": "The podium ceremony begins. Your performance is recognized.",
1378
+ "choices": [
1379
+ "celebrate",
1380
+ "prepare for next race"
1381
+ ],
1382
+ "transitions": {
1383
+ "celebrate": "end_celebration",
1384
+ "prepare for next race": "pitLane_start"
1385
+ },
1386
+ "consequences": {
1387
+ "celebrate": {}
1388
+ },
1389
+ "media": []
1390
+ }
1391
+ },
1392
+ "end": {
1393
+ "celebration": {
1394
+ "description": "You celebrate your achievement. Your team and fans are overjoyed.",
1395
+ "choices": [
1396
+ "end race day"
1397
+ ],
1398
+ "transitions": {
1399
+ "end race day": "end_end"
1400
+ },
1401
+ "media": []
1402
+ },
1403
+ "end": {
1404
+ "description": "Your racing day ends here. Your performance has impacted your standing in the championship.",
1405
+ "choices": [],
1406
+ "transitions": {},
1407
+ "media": []
1408
+ }
1409
+ }
1410
+ },
1411
 
1412
+ }
1413
 
1414
  #-------------------------#-------------------------#-------------------------#-------------------------
1415