Nico-Sch / RL-Chatbot

A task-oriented chatbot based on reinforcement learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RL-Chatbot

A single-domain task-oriented end-to-end chatbot based on reinforcement learning, which helps a user make a restaurant reservation.
Based on a model proposed in the paper https://arxiv.org/pdf/1703.01008.pdf while small portions of the code are based on https://github.com/maxbren/GO-Bot-DRL.

The training is done using a rule-based user simulator. The file dqn_model.h5 contains an already trained model which achieves a average success rate of more than 90% per 1000 dialogues generated by the user simulator.

Dependencies

  • python
  • numpy
  • tensorflow
  • keras
  • gensim

Run the bot

The file to be executed is DialogueManager.py.

Using the constants in Config.py the dialogue and learning can be modified. Especially:

  • Dialogue with real user and a UI: Set REAL_USER = True while PRINTING and IN_TRAINING are False (Default)
  • Training the chatbot: Set IN_TRAINING = True while REAL_USER and PRINTING are False
  • Dialogue between user simulator and bot: Set PRINTING = True while REAL_USER and IN_TRAINING are False

Main Loop of the Bot

Two training sessions and their average success rates

About

A task-oriented chatbot based on reinforcement learning


Languages

Language:Python 100.0%