Git Product home page Git Product logo

tracery_game's People

Contributors

serin-delaunay avatar

Watchers

 avatar  avatar

tracery_game's Issues

Use random start state

More than 1 start state should be available, and the resulting bot should be able to offer any of them randomly as a start tweet.

This requires changes to the grammar generation and game classes.

Improve state code generation

Current scheme is direct base 62 on game state. With slightly larger state spaces densely explored this will inevitably include slurs and other potentially triggering words.

Also, base 62 requires capitals, which slow down manual typing of codes and introduce ambiguity between I and l. A smaller base would allow these problems to be resolved, and could also limit possible damage.

Instead of direct state->code conversion, use a space of codes slightly larger than the explored space, choose from them pseudorandomly, and retry when unwanted words are encountered.

More convenient reply syntax

[code] [input] doesn't really work well for testing in the CBDQ/CMTS interface because Chrome's double-click-to-select functionality is inconsistent about including or excluding spaces.

An improvement would be to allow arbitrary strings in between, delimited by word breaks. This would include commas and spaces, though some pathological replies (with input strings before the active input string) may be interpreted in an unintuitive way.

Allow AI branching

In noughts and crosses, the AI currently selects a random good move at compilation time.

It should instead explore all good moves, and choose a random result when sending a reply.

This requires changes in the AI routine, the the generation of the reply specification, and the state tree exploration.

Add other games?

This game: https://en.wikipedia.org/wiki/Sprouts_(game)

Game length, and hence state graph size, is dependent on number of initial points, so with a small enough number of points it should fit in 4MB. The question is whether that number of points is large enough to allow an interesting game.

Packageify

It would be good to be able to put this on PyPI. Needs some normalisation of package structure first.

Make AI fallible

The AI in noughts and crosses should have a small chance of making a mistake (choosing a move from a uniform distribution). This requires #1, and to minimise file sizes requires the replies to be placed in two list variables (#minmax# and #random#). The actual reply is chosen by a biased selector (approximately 99:1?).

Improve game-over display

In noughts and crosses, the game-over display needs to use custom text rather than inherit from the xo library. This is a good location to actually use Tracery grammars.

Options and code display should also probably be removed.

Use AI with memoised decisions

In the noughts and crosses example, AI move evaluations are performed by https://github.com/dwayne/xo-python. This library evaluates each board independently, which is inefficient when trying to map the whole state graph with appropriate decisions. In #24, evaluation time is almost up to 3 minutes. This can be improved by using a different AI scheme where decisions are saved and reused.

Add an Oregon Trail-like game

A direct port of Oregon Trail may be impractical due to state space size, but some simplifications should allow a reasonably faithful adaptation. We could even SVGify the graphics!

Merge equivalent reply regexes

When inputs a and b both lead to the same game state or distribution of states, they should both be detected by a single regex. this will reduce the size of the replies file.

Add features to Sim

  • Cache state map and AI moves in files in order to generate grammars more quickly (#32)
  • Alt-text
  • Highlight triangles that cause loss
  • Record vertex permutations and report them in replies
  • Allow input formats more general than 1 2, eg. 12, 1, 2, 2 1
  • Empty lines should be drawn under coloured lines
  • Reduce output SVG size so it fits in CBTS preview box (#34)
  • State strings should be compressed (#33, #6)
  • Needs messages for game over states
  • AI's optimal_play key should be expanded to classify all options as optimal, suboptimal, or losing, for random selection
  • Messages/"taunts" during game to indicate whether the AI expects to win or lose with perfect play. Could even be dependent on previous state and determined by reply selection

Fix circle example

The circle example was broken by features added in order to accommodate noughts and crosses. It needs to be updated.

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.