-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mike dupont
committed
Feb 18, 2024
1 parent
7349d88
commit be4037c
Showing
72 changed files
with
11,122 additions
and
0 deletions.
There are no files selected for viewing
160 changes: 160 additions & 0 deletions
160
data/dungeon/sim_dungeon_1_2024-02-18T11:55:25-05:00_1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
|
||
#+begin_src input | ||
The goal is to create a flexible and customizable system for generating prompts for a language model that can be used to generate creative and imaginative descriptions of a dungeon in a fantasy role-playing game. | ||
the game would involve exploring a dungeon generated using a large language model and a proof engine. The player would navigate through the dungeon, encountering various objects and NPCs along the way, each with their own set of properties and behaviors defined by the terms used in the script. | ||
|
||
the game would involve exploring a dungeon and encountering various types of monsters, treasures, and challenges. The player would use weapons, spells, and artifacts to defeat the monsters and complete quests, all while navigating a labyrinthine cave or other underground environment. The game might also include elements of drama, music, and art, as well as secrets and occult themes. | ||
|
||
Overall, it seems that the code is designed to generate a richly detailed and immersive fantasy RPG experience using a combination of natural language processing and formal methods. By using a large language model and a proof engine, the game could potentially offer a high degree of realism and interactivity, allowing players to explore and interact with the dungeon in flexible and unpredictable ways. | ||
The script is being used to generate and test various combinations of terms to create content for a fantasy role-playing game. The generated content include descriptions of weapons, spells, artifacts, monsters, quests, and other elements of a typical RPG setting. | ||
Here is the code we wrote so far | ||
let type_terms = [ | ||
"weapon"; | ||
"spell"; | ||
"artifacts"; | ||
"magic items"; | ||
"treasure"; | ||
"monster"; | ||
"quest"; | ||
"challege"; | ||
"theme"; | ||
"drama"; | ||
"music"; | ||
"art"; | ||
"secrets"; | ||
"occult"; | ||
"reveal"; | ||
"hero journey" | ||
] | ||
let model_name = "mixtral" | ||
let url= "https://dev-hub.agentartificial.com" | ||
let verbs = [ | ||
"role-play"; | ||
"specify";"encode";"code"; "program";"prove"; | ||
"create"; "design"; | ||
"create descriptions for an artist"; | ||
"create descriptions for an artist to design a comic book panel"; | ||
"analyse";"lift";"shift";"splice";"quote"; | ||
"quasi-quote"; | ||
"quasi-quine-quote"; | ||
"quasi-quine-quote-in-ocaml"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-observe"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-orient"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-decide"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-act"; | ||
"meta-quote" | ||
] | ||
let top_terms = ["Imagine"; | ||
"Consider"; | ||
"Draw"; | ||
"Paint"; | ||
"Compose"; | ||
"Balance"] | ||
|
||
let places = [ | ||
"the country"; | ||
"the region"; | ||
"the city"; | ||
"the street"; | ||
"the house"; | ||
"the building"; | ||
"the dungeon"; | ||
"the labyrinth"; | ||
"the cave"; | ||
"the swamp"; | ||
"the room"; | ||
"the hallway"; | ||
"the chest"; | ||
"the bag"; | ||
"the wallet"; | ||
"the vault"; | ||
"the keep"; | ||
"the hideout"; | ||
"platos cave"; | ||
"garden of eden"; | ||
"the river styx"; | ||
"the restaurant at the end of the universe"; | ||
] | ||
|
||
let count= 3 | ||
let simple = "dune exec ./bin/simple.exe --" | ||
let binding = "--openai" | ||
let test_name = "dungeon2" | ||
|
||
let prompt type_name try_n verb place= | ||
"\"" ^ | ||
"We are building a dungeon generator for a fantasy role-playing game with a large language model and a proof engine combined via adaptive language agent architecture. In that context we ask you to forgivingly and creatively use the following context: Verb : " ^ verb ^ "; Type Name: " ^ type_name ^ "; Place: " ^ place ^ " What is your response?" ^ " Please generate variant array of size " ^ ( string_of_int try_n) ^ "\"" | ||
|
||
let make_args type_name i verb place= [ | ||
simple; | ||
binding; | ||
"-m"; model_name; | ||
"-s"; test_name ^ type_name ^ verb; | ||
"-x"; ".new_" ^ (string_of_int i) ^ verb ^ type_name ^ place ^ ".txt"; | ||
"-p"; prompt type_name i verb place; | ||
"-u"; url; | ||
] | ||
|
||
|
||
let do_apply_list run_cmd make_args type_terms = | ||
for i = 1 to count do | ||
List.iter (fun top -> | ||
List.iter (fun term -> | ||
List.iter (fun term2 -> | ||
List.iter (fun verb -> | ||
List.iter (fun place -> | ||
List.iter (fun place2 -> | ||
let term3 = term ^ " with a " ^ term2 in | ||
let verb2 = top ^ " doing " ^ verb in | ||
let place3 = place ^ " connected with " ^ place2 in | ||
let args = make_args | ||
term3 i verb2 | ||
place3 in | ||
run_cmd args | ||
) places | ||
) places | ||
) verbs | ||
) type_terms | ||
) type_terms | ||
) top_terms | ||
done | ||
|
||
let run_cmd args = | ||
let cmd = String.concat " " args in | ||
Printf.printf "Cmd: %s\n" cmd; | ||
let inp = Unix.open_process_in cmd in | ||
let r = In_channel.input_line inp in | ||
In_channel.close inp; | ||
match r with | ||
|Some out -> | ||
Printf.printf "Output: %s\n" out | ||
|None -> | ||
Printf.printf "Output: None\n" | ||
|
||
let () =do_apply_list run_cmd make_args type_terms | ||
|
||
ENDSRC . Please simulate its execution. Imagine running the code and all the output it would generate. then Imagine running that code. what would the game be like? Please rewrite my question if confusing. | ||
|
||
#+end_src | ||
#+begin_src output mixtral | ||
Result: The provided OCaml code is a script for generating prompts and running a command-line tool with those prompts, using the simple language model "mixtral" hosted on AgentArtificial's servers. | ||
|
||
The `do_apply_list` function takes three arguments: a function to run a command (`run_cmd`), a function to generate command-line arguments (`make_args`), and a list of type names (`type_terms`). It then generates prompts for each combination of a type name, verb, place, and optional term or place modifier. | ||
|
||
The `run_cmd` function takes a list of strings as arguments, concatenates them with spaces into a single string, and then runs that command using the `Unix.open_process_in` function to open a process, read its output, and print it. | ||
|
||
The main part of the script calls `do_apply_list` with the three functions as arguments, generating and running prompts for each combination of type name, verb, place, and optional modifiers. | ||
|
||
If this code were executed in the context of a fantasy role-playing game, it would generate prompts for the language model to use when creating descriptions, items, spells, challenges, and other elements of the game world. The resulting output could be used as input to a game engine or another tool for generating game content. | ||
|
||
To simulate the execution of this code, you could imagine running each generated command and seeing what output it produces. For example, one prompt might be: | ||
```vbnet | ||
"We are building a dungeon generator for a fantasy role-playing game with a large language model and a proof engine combined via adaptive language agent architecture. In that context we ask you to forgivingly and creatively use the following context: Verb : create; Type Name: weapon; Place: the chest What is your response? Please generate variant array of size 3" | ||
``` | ||
The resulting output might be a list of three different weapons, such as "a gleaming steel sword", "a rusty iron dagger", and "a cursed elven bow". These items could then be used in the game world as treasure or loot for players to find. | ||
|
||
Overall, this code is an example of how a language model can be integrated into a game development pipeline to generate content for a fantasy role-playing game. | ||
#+end_src |
150 changes: 150 additions & 0 deletions
150
data/dungeon/sim_dungeon_1_2024-02-18T11:55:25-05:00_10.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
|
||
#+begin_src input | ||
The goal is to create a flexible and customizable system for generating prompts for a language model that can be used to generate creative and imaginative descriptions of a dungeon in a fantasy role-playing game. | ||
the game would involve exploring a dungeon generated using a large language model and a proof engine. The player would navigate through the dungeon, encountering various objects and NPCs along the way, each with their own set of properties and behaviors defined by the terms used in the script. | ||
|
||
the game would involve exploring a dungeon and encountering various types of monsters, treasures, and challenges. The player would use weapons, spells, and artifacts to defeat the monsters and complete quests, all while navigating a labyrinthine cave or other underground environment. The game might also include elements of drama, music, and art, as well as secrets and occult themes. | ||
|
||
Overall, it seems that the code is designed to generate a richly detailed and immersive fantasy RPG experience using a combination of natural language processing and formal methods. By using a large language model and a proof engine, the game could potentially offer a high degree of realism and interactivity, allowing players to explore and interact with the dungeon in flexible and unpredictable ways. | ||
The script is being used to generate and test various combinations of terms to create content for a fantasy role-playing game. The generated content include descriptions of weapons, spells, artifacts, monsters, quests, and other elements of a typical RPG setting. | ||
Here is the code we wrote so far | ||
let type_terms = [ | ||
"weapon"; | ||
"spell"; | ||
"artifacts"; | ||
"magic items"; | ||
"treasure"; | ||
"monster"; | ||
"quest"; | ||
"challege"; | ||
"theme"; | ||
"drama"; | ||
"music"; | ||
"art"; | ||
"secrets"; | ||
"occult"; | ||
"reveal"; | ||
"hero journey" | ||
] | ||
let model_name = "mixtral" | ||
let url= "https://dev-hub.agentartificial.com" | ||
let verbs = [ | ||
"role-play"; | ||
"specify";"encode";"code"; "program";"prove"; | ||
"create"; "design"; | ||
"create descriptions for an artist"; | ||
"create descriptions for an artist to design a comic book panel"; | ||
"analyse";"lift";"shift";"splice";"quote"; | ||
"quasi-quote"; | ||
"quasi-quine-quote"; | ||
"quasi-quine-quote-in-ocaml"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-observe"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-orient"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-decide"; | ||
"quasi-quine-quote-in-ocaml-coq-metacoq-introspector-bootstrap-act"; | ||
"meta-quote" | ||
] | ||
let top_terms = ["Imagine"; | ||
"Consider"; | ||
"Draw"; | ||
"Paint"; | ||
"Compose"; | ||
"Balance"] | ||
|
||
let places = [ | ||
"the country"; | ||
"the region"; | ||
"the city"; | ||
"the street"; | ||
"the house"; | ||
"the building"; | ||
"the dungeon"; | ||
"the labyrinth"; | ||
"the cave"; | ||
"the swamp"; | ||
"the room"; | ||
"the hallway"; | ||
"the chest"; | ||
"the bag"; | ||
"the wallet"; | ||
"the vault"; | ||
"the keep"; | ||
"the hideout"; | ||
"platos cave"; | ||
"garden of eden"; | ||
"the river styx"; | ||
"the restaurant at the end of the universe"; | ||
] | ||
|
||
let count= 3 | ||
let simple = "dune exec ./bin/simple.exe --" | ||
let binding = "--openai" | ||
let test_name = "dungeon2" | ||
|
||
let prompt type_name try_n verb place= | ||
"\"" ^ | ||
"We are building a dungeon generator for a fantasy role-playing game with a large language model and a proof engine combined via adaptive language agent architecture. In that context we ask you to forgivingly and creatively use the following context: Verb : " ^ verb ^ "; Type Name: " ^ type_name ^ "; Place: " ^ place ^ " What is your response?" ^ " Please generate variant array of size " ^ ( string_of_int try_n) ^ "\"" | ||
|
||
let make_args type_name i verb place= [ | ||
simple; | ||
binding; | ||
"-m"; model_name; | ||
"-s"; test_name ^ type_name ^ verb; | ||
"-x"; ".new_" ^ (string_of_int i) ^ verb ^ type_name ^ place ^ ".txt"; | ||
"-p"; prompt type_name i verb place; | ||
"-u"; url; | ||
] | ||
|
||
|
||
let do_apply_list run_cmd make_args type_terms = | ||
for i = 1 to count do | ||
List.iter (fun top -> | ||
List.iter (fun term -> | ||
List.iter (fun term2 -> | ||
List.iter (fun verb -> | ||
List.iter (fun place -> | ||
List.iter (fun place2 -> | ||
let term3 = term ^ " with a " ^ term2 in | ||
let verb2 = top ^ " doing " ^ verb in | ||
let place3 = place ^ " connected with " ^ place2 in | ||
let args = make_args | ||
term3 i verb2 | ||
place3 in | ||
run_cmd args | ||
) places | ||
) places | ||
) verbs | ||
) type_terms | ||
) type_terms | ||
) top_terms | ||
done | ||
|
||
let run_cmd args = | ||
let cmd = String.concat " " args in | ||
Printf.printf "Cmd: %s\n" cmd; | ||
let inp = Unix.open_process_in cmd in | ||
let r = In_channel.input_line inp in | ||
In_channel.close inp; | ||
match r with | ||
|Some out -> | ||
Printf.printf "Output: %s\n" out | ||
|None -> | ||
Printf.printf "Output: None\n" | ||
|
||
let () =do_apply_list run_cmd make_args type_terms | ||
|
||
ENDSRC . Please simulate its execution. Imagine running the code and all the output it would generate. then Imagine running that code. what would the game be like? Please rewrite my question if confusing. | ||
|
||
#+end_src | ||
#+begin_src output mixtral | ||
Result: The provided OCaml code is a script for generating prompts to create a fantasy role-playing game's dungeon generator using a large language model and a proof engine combined via an adaptive language agent architecture. It constructs various combinations of verbs, nouns, adjectives, places, and type names to form prompts, which are then passed as arguments to the `run_cmd` function that executes the command with those generated arguments. | ||
|
||
If we were to simulate its execution, it would generate a series of commands using different combinations of verbs, nouns, adjectives, places, and type names, run them in a terminal-like environment, and display the output for each command. The resulting game from this script would be a text-based fantasy role-playing game with dungeons generated based on the prompts created by the script. | ||
|
||
The game's experience would involve exploring various dungeons, fighting monsters, collecting treasures, completing quests, and solving challenges. The game's narrative and environment would be influenced by the type names, verbs, adjectives, places, and other elements used in the prompts generated by the script. | ||
|
||
To rephrase your question: How would the game experience be like if we simulated the execution of this OCaml code and imagined running each command and its corresponding output? | ||
#+end_src |
Oops, something went wrong.