Code Monkey home page Code Monkey logo

dairector's Introduction

CircleCI

dAIrector (๐Ÿค– + ๐Ÿ“–)

dAIrector is an automated director which collaborates with humans storytellers.

Documentation

Go to https://korymath.github.io/dairector/

Set Up

# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install and upgrade portaudio, swig, git, python3
brew install --upgrade portaudio swig git python3
# set up the python3 virtual environment
virtualenv -p python3 env
# activate the virtual environment
source env/bin/activate
# install requirements
pip install -r requirements.txt
# in case of an error with pyaudio, may need to point to brew intall directly
# see https://stackoverflow.com/questions/33513522/when-installing-pyaudio-pip-cannot-find-portaudio-h-in-usr-local-include
# for more information
# pip install --global-option='build_ext' --global-option='-I/Users/korymath/homebrew/Cellar/portaudio/19.6.0/include' --global-option='-L/Users/korymath/homebrew/Cellar/portaudio/19.6.0/lib' pyaudio
# get the trained model and example files
wget https://storage.googleapis.com/api-project-941639660937.appspot.com/dairector_pretrained_examples.zip
# unpack the files
unzip dairector_pretrained_examples.zip

Run

# first ensure that your environment is activated
source env/bin/activate
# example 1a, generate a new subgraph from the entire plotto conflict graph
python markovgenerator.py -t outputfile.json plottoconflicts.json
# example 1b, interactive story telling using the plot subgraph and tv tropes hints
python -W ignore storyteller.py outputfile.json tvtropes.json tvtropesmodel.bin plottomodel.bin

Interactive Beat Generation

The storyteller is interactive, it understands the following commands:

  • next [cue_text]
  • hint [cue_text]
  • quit

next uses the vector model from plottomodel.bin to find the next story beat based on the given cue text.

hint uses the tvtropesmodel.bin to find an appropriate trope.

Install pocketsphinx

pip install pocketsphinx==0.1.15
pip install PyAudio==0.2.11

Basic Usage

Improvisors on stage can cue the system to provide the next plot point or the next hint. The improvisors provide the dialogue for each plot clause.

Training a new model

python topicvectors.py tvtropesmodel.bin tvtropes.json

Cite

@inproceedings{eger2018dairector,
  author = {{Eger}, M. and {Mathewson}, K.~W.},
  title = "{dAIrector: Automatic Story Beat Generation through Knowledge Synthesis}",
  booktitle = {AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment (AIIDE18), Joint Workshop on Intelligent Narrative Technologies and Intelligent Cinematography and Editing},
  publisher = {AAAI},
  year = 2018,
  address={Edmonton, Alberta, Canada},
  month = 10,
}

License

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

dairector's People

Contributors

korymath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.