Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Feb 18, 2024
1 parent 3c9632f commit 8983f2f
Show file tree
Hide file tree
Showing 34 changed files with 5,786 additions and 0 deletions.
23 changes: 23 additions & 0 deletions data/dungeon/example.ebnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
dungeon ::= (path | room | treasure | monster)+

path ::= "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, please generate a path from the entrance to the end of the dungeon."

room ::= "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, please describe a room in the dungeon with the following features: (feature1, feature2, ...)"

treasure ::= "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, please describe a treasure in the dungeon with the following features: (feature1, feature2, ...)"

monster ::= "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, please describe a monster in the dungeon with the following features: (feature1, feature2, ...)"

feature ::= "type" | "size" | "shape" | "color" | "location" | "behavior"

type ::= "weapon" | "spell" | "artifact" | "magic item" | "trap"

size ::= "small" | "medium" | "large" | "huge"

shape ::= "round" | "square" | "rectangular" | "irregular"

color ::= "red" | "blue" | "green" | "yellow" | "purple"

location ::= "north" | "south" | "east" | "west" | "center" | "corner"

behavior ::= "aggressive" | "defensive" | "neutral" | "friendly"
189 changes: 189 additions & 0 deletions data/dungeon/sim_dungeon_1_2024-02-18T12:03:17-05:00_141.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@

#+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 imagine the simulation its execution. Imagine running the code and all the output it would generate. Generate a grammar that we can use to generate prompts for create the dungeon using your knowledge. Write the grammar in EBNF notation. We will start with path through the dungeon starting at the entrance and going all the way to the ends.

#+end_src
#+begin_src output mixtral
Result: Here is an example of an EBNF grammar for generating prompts for creating a dungeon:
```less
dungeon-prompt ::= "Imagine" SP "a path" SP "from" SP "the entrance" SP "to" SP "the end" NL
room-sequence

room-sequence ::= room NL room-sequence | epsilon

room ::= "Consider" SP room-name SP "in" SP location SP NL
description

room-name ::= identifier

location ::= location-type SP "connected with" SP adjacent-location

adjacent-location ::= location | "the end"

location-type ::= "a" SP location-keyword

location-keyword ::= "dungeon room" | "corridor" | "passageway" | "chamber"

description ::= "Draw" SP description-detail NL
"Paint" SP description-detail NL
"Compose" SP description-detail NL
"Balance" SP description-detail NL

description-detail ::= "the appearance of the" SP room-name NL
"the features of the" SP room-name NL
"the layout of the" SP room-name NL
"the contents of the" SP room-name NL
"the atmosphere of the" SP room-name NL
epsilon
```
In this grammar, `SP` represents a single whitespace character and `NL` represents a newline character. The non-terminals are defined as follows:

* `dungeon-prompt`: The top-level non-terminal representing the overall structure of the prompt. It consists of an initial phrase introducing the task, followed by a sequence of rooms.
* `room-sequence`: A repetition of one or more room descriptions.
* `room`: A single room description, consisting of a name, location, and detailed description.
* `room-name`: An identifier representing the name of the room.
* `location`: The type of location and its connection to adjacent locations.
* `adjacent-location`: The location that is connected to the current location, which can be another room or "the end" of the path.
* `location-type`: A keyword representing the type of location (e.g., dungeon room, corridor).
* `location-keyword`: A specific keyword representing a type of location.
* `description`: The detailed description of the room, which consists of one or more creative actions such as drawing, painting, composing, or balancing.
* `description-detail`: A phrase describing some aspect of the room's appearance, features, layout, contents, or atmosphere.

Note that this is just an example grammar and can be adjusted to fit specific needs or preferences.
#+end_src
161 changes: 161 additions & 0 deletions data/dungeon/sim_dungeon_1_2024-02-18T12:03:17-05:00_142.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@

#+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 imagine the simulation its execution. Imagine running the code and all the output it would generate. Generate a grammar that we can use to generate prompts for create the dungeon using your knowledge. Write the grammar in EBNF notation. We will start with path through the dungeon starting at the entrance and going all the way to the ends.

#+end_src
#+begin_src output mixtral
Result: Here is an example of an EBNF grammar that could be used to generate prompts for creating a dungeon:
```less
dungeon_prompt ::= "Imagine" | "Consider" | "Draw" | "Paint" | "Compose" | "Balance"
type_name ::= "weapon" | "spell" | "artifact" | "magic item" | "treasure" | "monster" | "quest" | "challenge" | "theme" | "drama" | "music" | "art" | "secrets" | "occult" | "reveal" | "hero journey"
type_modifier ::= "with a " (attribute | "magical")
attribute ::= "powerful" | "durable" | "fast" | "deadly" | "mysterious" | "rare" | "legendary"
verb ::= "role-play" | "specify" | "encode" | "code" | "program" | "prove" | "create" | "design" | "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"
place ::= "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" | "the entrance" | "the end"
path ::= place ("," place)* ("connected with" place)?
prompt ::= dungeon_prompt type_name (type_modifier)? verb path
```
In this grammar, a `dungeon_prompt` is one of several words that can be used to begin a prompt. A `type_name` specifies the type of object or feature being created for the dungeon. The optional `type_modifier` can be used to add additional attributes to the type name. A `verb` describes the action to be taken, and a `place` is a location in the dungeon. A `path` is a list of one or more places separated by commas, optionally followed by a description of how they are connected. Finally, a `prompt` consists of a `dungeon_prompt`, a `type_name`, an optional `type_modifier`, and a `verb` that operates on a `path`.

For example, the following prompt would be generated by this grammar:
```less
Imagine a treasure with a magical power in the entrance connected with the end.
```
This prompt instructs the user to imagine a magical treasure located at the dungeon entrance, which is connected to the end of the dungeon. By generating prompts in this way, we can create a variety of different scenarios for users to explore and populate their dungeons with.
#+end_src
Loading

0 comments on commit 8983f2f

Please sign in to comment.