Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby interpreter for the AIML as an updated rubygem

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 conf
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Rakefile
Octocat-spinner-32 programr.gemspec



This is just a simple port of (authored in 2007), to something a tiny bit more usable. No new code really, I just sorta took the necessary parts to turn it into a gem for curiosity's sake.

AIML itself seems pretty simple, and weak as far as pattern matching goes, but the ALICE bot has won the Loebner prize, so there's that.


ProgramR is a Ruby implementation of an interpreter for the Artificial Intelligence Markup Language (AIML) based on the work of Dr. Wallace and defined by the Alicebot and AIML Architecture Committee of the A.L.I.C.E. AI Foundation

Some of the ALICE AIML files have thrown parse errors with certain caraters in my tests, so a subset is available here:

Original Authors:

Mauro Cicio, Nicholas H.Tollervey and Ben Minton


Add this line to your application's Gemfile:

gem 'programr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install programr

You can find a set of ALICE AIML files hosted at

Some of them have thrown errors in my tests so a subset is available here:



require 'bundler'
Bundler.setup :default

require 'programr'

if ARGV.empty?
  puts 'Please pass a list of AIMLs and/or directories as parameters'
  puts 'Usage: ruby programr_test.rb {aimlfile|dir}[{aimlfile|dir}]...'

robot =

while true
  print '>> '
  s = STDIN.gets.chomp
  reaction = robot.get_reaction(s)
  STDOUT.puts "<< #{reaction}"


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.