Chatbot v1

On the first day of AI we worked on making a basic chatterbot that could ask us for our questions and respond with generic answers.

I only have a couple questions currently but none of them give the actual answer to any question. There is a LOT of work to be done!

Later that same day I revisited Python and my "bot" to add an answer randomizer, and an infinite loop that is not so infinite.

It makes for some very interesting and sometimes hilarious conversations.

On the second day of working with AI we added text to speech (TTS) using a couple of add ons to python. We first added a program called steel and then eSpeak. Using these add ons we could make our chatbots say whatever we wanted them to say. I was making my program on python 3.3 and since these add ons only work on platforms below that I had to downgrade and change some of my code.



When the program was run on python 2.7 after the changes were made it showed the normal text and when it spoke a black command window showed up with no text because this was for the talking and no writing was required on it. To gather more ideas of what we should do with our bots Mr. Farrell suggested that we look at other chatbots and videos of them online. The videos we watched we're seriously hilarious the one I found was a guy who made 2 cleverbots talk to each other and then he acted out what they said.

I also had a conversation with cleverbot myself and boy did it get weird but funny fast.



The Turing Test



The Turing test is a test that was created by a man named Alan Turing. This test will test the machine's ability to exhibit intelligent behavior equivalent to, or indistinguishable from, that of a human. During the test the judge engages in natural language conversations with a human and a machine designed to generate performance indistinguishable from that of a human being; all participants are separated from each other and if the judge cannot reliably tell the machine from the human then the machine is said to have passed the test.

Chatbot v2/ Factbot

Today we worked on adding wolfram alpha to what we already knew about chatbots. This made it a FACTbot which could answer pretty much any question you throw at it.

We also made it talk the answers back to us.

We also learned how to make a program that would write whatever we told it to on a text file.



Then by putting all of these tools together I made a Factbot that would tell you the right answer through voice, text, and it would write it down for you.

After lunch we watched a video about a robot named Watson after the founder of IBM that could play Jeopardy better than the top players ever in the history of Jeopardy. This video was astonishing because they used technology to make a robot that could literally learn and use that knowledge to answer questions in natural language.

Intellect Games

On Thursday we were assigned the task to make intelligent games. We were supposed to make Rock Paper Scissors and hangman but I ran out of time because I made Rock Paper scissors lizard spock. As you can see in the pictures I was originally going to make it so if you said you did not like the computer it would play a different game where you would win everytime, but like I said I ran out of time.



The gamerules that are commented out were just to help me make the if, else, and elif statements. On Friday before the field trip I finished the hangman game to the point where I only have a couple bugs.

The main bug I have is that when letters are input they wont say that the letter you wrote is part of the word even if it is; this is a big problem because it effects all of the gameplay.



I have the main part of the game finished which is getting the actual image of text to print out and have the correct limbs in the correct order.

I also have the list of letters used and a words list that I access for the word that will be used in the game. I will just have to make my final adjustments and some bug fixes on Monday. On monday I perfected my idea of the hangman game by getting rid of all the bugs that I know of and making it actuallly know how to spell the word.

The problem was that all the letters input in to the game would automatically be made into upper case. This was a problem because the list of words I am using is in all lowercase. This fix was just changing upper to lower. Then when I finished fixing it I made it into an infinite loop so you could play again if you wanted to and also you would be asked if you wanted to play at all in the pretext of the game.



On Tuesday and Wednesday we worked on making a 2 player person vs. person tic tac toe game. Now, tic tac toe is a simple game if you play in real life so you might be thinking "How is this a hard game to make?" Well, I'll tell you! This game required us to define each square, come up with rules and easy controls for the game, think of every outcome for the game and make a response for the winner and if there was a tie game, and we had to make it check if someone had won.



As you can see, this took a LOT of code.

When someone won the board with the winning move is printed out and then a message that they had one comes up.

If there was a tie then the same thing but with a different message and way to check if was a tie comes up.

While I was making a game that had a tie I made a mistake and made X 'win' in a downward lane but the win message did not come up so I went back and realized I left out the code where it tests for a downward win so I added it and fixed the problem. This completed my 2 player game of tic tac toe! We will be adding an AI that 1 player can go against to see if they can beat a computer that can play tic tac toe. On Thursday I tried adding an infinite loop so you could keep playing again without having to restart the program. I added it but when the game started, after the first move, the game would ask to play again which means I did something wrong but I don't know what. If it did what it was intended to do then only after the game of tic tac toe was over it would ask if you wanted to play again but it didn't because it broke.