MegaHAL Turns Twenty-One
medium.comI spent the last couple of weeks rewriting MegaHAL, and it's finally online again after a brief absence.
You can talk with MegaHAL here: http://megahal.kranzky.com/
All source is freely available on GitHub, unencumbered by a license.
The main MegaHAL repository is https://github.com/jasonhutchens/megahal/ It includes a console application and eight built-in personalities, including Sherlock Holmes. And it's easy to hook into its API if you want to build something else with it.
MegaHAL uses Sooth, which is a simple stochastic predictor, written in C but wrapped in a Ruby gem. It's available at https://github.com/jasonhutchens/sooth/ MegaHAL uses five separate Sooth predictors to do its thing. You could build other things with it.
Finally, the code for the server itself is available at https://github.com/jasonhutchens/megahal-server/ It's a Rails 4.2 app with a crappy Bootstrap theme. A basic REST api hooks things up, and a daemonized version of MegaHAL processes the queue of jobs coming in from the world.
Have fun, I'm looking forward to seeing how warped the online personality becomes, and how big the brain file grows.
Share and Enjoy!
I miss the old eggdrop IRC module. Anyone working on anything modern?
I still can get eggdrop and the module to compile fairly easily, and it works for the most part but the code is fairly old and not the best.
Thanks :)
I had some fun moments hooking Megahal up to IRC myself :-)
Nice work! I remember wrapping the old MegaHAL in a Ruby module, and here you are rewriting the whole thing in Ruby :)
One nitpick about the web app: if you reach the bottom of the page you can't see the answers anymore, can you add an auto-scroll?
Thanks for the feedback; I did try to do the autoscroll, so sorry it's not working. Will attempt a fix soon...
OK, fixed the autoscroll I think. Let me know if it does / doesn't work for you.
Very cool. Years back I attempted to write a web app in Python to chat with MegaHAL, and though I managed to get something working, I was in way over my head at the time and the app had too many bugs to release to the public.