https://github.com/holsee/beerexpert
Expert System to Categorise Beer (in Elixir)
https://github.com/holsee/beerexpert
elixir expert-system
Last synced: about 1 month ago
JSON representation
Expert System to Categorise Beer (in Elixir)
- Host: GitHub
- URL: https://github.com/holsee/beerexpert
- Owner: holsee
- License: other
- Created: 2015-07-16T02:14:50.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-22T16:11:26.000Z (almost 10 years ago)
- Last Synced: 2025-03-31T02:21:57.083Z (2 months ago)
- Topics: elixir, expert-system
- Language: Elixir
- Size: 129 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Beer Expert
===========An expert system written in elixir (using the Erlang [seresye](https://github.com/afiniate/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](http://www.periodicbeer.com/).
### Usage
Start the expert.
``` elixir
Expert.start
```Provide the Expert with some information pertaining to the beer your which to classify
``` elixir
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.0Expert.tell 'Boiler Room', {:ibu, 7}
# etc...
```Ask the Expert what classifications match the beer:
``` elixir
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