PHP & mySQL AIML Chat Bot – Artificial Intelligence Markup Language
Download the code here:cyberbot
A long time ago I created this little bit of intelligence, which at the time was pretty good. It’s based on AIML
The XML dialect called AIML was developed by Richard Wallace and a worldwide free software community between 1995 and 2002. AIML formed the basis for what was initially a highly extended Eliza called “A.L.I.C.E.” (“Artificial Linguistic Internet Computer Entity”), which won the annual Loebner Prize Competition in Artificial Intelligence three times, and was also the Chatterbox Challenge Champion in 2004.
To download the sourcecode, click on this link.
To set it up, you need something like xampp. If you’re using Windows, then typically you’d install this software in c:/xampp/htdocs/cyberbot (or replace cyberbot with something else).
Edit the settings.php file. You want to replace the following parameters with your server settings. Typically your password would be blank, so remove that.
$website_directory = “c:/xampp/htdocs/cyberbot/”;
$database_server = “localhost”;
$database_port = 3306;
$database_database = “cyberbot”;
$database_user = “root”;
$database_password = “root”;
To open the application, you open your browser and navigate to http://localhost/cyberbot (or your equivalent name used above).
I’ve included a “poor” attempt at teaching the app to learn. Each time it can’t find a response, it stores it in the database, however it matches sentences as they’re written. You open the file unknown.php and type responses beside each question. As you do that, they’ll disappear off this page. Now when you open the main index.php page the questions are answered.
Drop a comment below if you need any help.