Skip to content

holsee/BeerExpert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beer Expert

An expert system written in elixir (using the Erlang seresye engine) to aid in beer classification based on known information about a given beer.

The systems knowledge is comprised of facts obtained from the beer periodic table.

Usage

Start the expert.

Expert.start

Provide the Expert with some information pertaining to the beer your which to classify

Expert.tell 'Boiler Room', {:abv, 2.9}

# abv_categorise => Expert thinks Boiler Room could be a English Mild as abv 2.9 is between 2.5 & 4.1
# abv_categorise => Expert thinks Boiler Room could be a Berliner Weisse as abv 2.9 is between 2.5 & 3.6
# abv_categorise => Expert thinks Boiler Room could be a Scottish Light 60/- as abv 2.9 is between 2.8 & 4.0

Expert.tell 'Boiler Room', {:ibu, 7}

# etc...

Ask the Expert what classifications match the beer:

Expert.ask 'Boiler Room'

# => 

[{:beer_match, 'Boiler Room', {:beer_style, 19, 'Scottish Light 60/-'}},
 {:beer_match, 'Boiler Room', {:beer_style, 1, 'Berliner Weisse'}},
 {:beer_match, 'Boiler Room', {:beer_style, 20, 'English Mild'}}]

TODO

  • Finish implementing all the rules.
  • Tidy up Expert layer, maybe find a smarter way to refine the matches.
  • Add Expert.how method to backtrack the decisions taken to classify beer.

Contribute

Fork and PR... simple as that.

License

BSD License

About

Expert System to Categorise Beer (in Elixir)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages