Coder Social home page Coder Social logo

20q's Introduction

20Q

A bot trained with an artificial neural network to play a simplified version of 20 questions. Uses a "zoo" dataset as guess options for the user and targets for the bot, with animal features forming the questions and answers.

Instructions

The program runs on Python 2.7, modules are in requirements.txt: numpy==1.12.0, matplotlib==2.0.2

There are two modes and four datasets which you can use to interact with the bot:

MODES:

  1. 'play': load a previously trained and optimised network.
  2. 'crossvalidate': train a network for a dataset and then play with that network.

DATASETS:

  1. 'micro': for very basic training. 5 animals + 5 questions, question limit = 4.
  2. 'small': testing basic intelligence. 12 animals + 6 questions, question limit = 5.
  3. 'medium': for testing smart question selection. 13 animals + 15 questions, question limit = 6.
  4. 'big': the big kahuna... 58 animals + 28 questions, question limit = 13.

To run the bot in either mode with a dataset:

python 20q.py

e.g. python 20q.py medium crossvalidate python 20q.py big play

It is recommended that 'crossvalidate' mode only be used on datasets micro, small or medium (not big), as training for 'big' takes 20-30 mins.

20q's People

Contributors

earthtojake 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.