Artificial Intelligence

Multiple Intelligences

Artificial Intelligence, an intelligence that is man made. Yet, how do we define intelligence? According Howard Gardner there are nine different types of intelligences.

Musical (This area has to do with sensitivity to sounds, rhythms, tones, and music)
Visual Spatial (This area deals with spatial judgment and the ability to visualize with the mind's eye)
Verbal (People with high verbal-linguistic intelligence display a facility with words and languages)
Mathematical (This area has to do with logic, abstractions, reasoning, numbers and critical thinking)
Kinaesthetics (The core elements of the bodily-kinaesthetic intelligence are control of one's bodily motions and the capacity to handle objects skilfully)
Interpersonal (This area has to do with their sensitivity to others' moods, feelings, temperaments and motivations, and their ability to cooperate in order to work as part of a group)
Intrapersonal (This area has to do with introspective and self-reflective capacities)
Naturalistic (This area has to do with nurturing and relating information to one's natural surroundings)

A Breif History

Alan Turing

Alan Turing was a British mathematician, logician, cryptanalyst, computer scientist and philosopher. He is widely considered the father of modern of theoretical computer science. He came up with the Turing Test. This was a test that pitted a computer against a person. A person would stand in a room and have a text conversation with a computer or person in another room. The point of the test was to see if the person could tell if it computer was a person in the other room.

John McCarthy

John McCarthy was a computer scientist at MIT. The reason he is important to computer science is because he was the first person to call and international conference on the topic of Artificial Intelligence. He also was the person who coined the term Artificial Intelligence(Bamford 4/21). Another important achievement of his is writing the programming language Lisp. This is now the programming language of choice for AI programmers. Marvin Minsky was a co-worker of John McCarthy, and worked on similar projects. However he also wrote papers on the Society of Mind Theory, a theory trying to define intelligence.


Chatbots, are AI's that you can talk with. There are many different ones on the internet. One is called Jabberwacky and it doesnt work to well, here is an example of a conversation i had with it.

After looking at bots on the internet we moved onto making our with python. However, our robots don't talk using equations based on what is said, instead they are code based, with selective answers. Here is an example of my conversation with my bot. The probelm with our bots is that we don't have enough time or experience to make them perfect if we had enough time, we could set the bots to answer everything and respond differently to insults or compliments. Our bots are solid with only a few paths to take in the conversation.

Here is a picture of code for the bot

Overall, programming a bot is quite hard, takes time and effort to make it talk effectively without breaking.

Here is a full conversation with my robot


The next thing we worked on was FactBots.You can ask them questions and they will pull it off of the Wolfram Database. The Wolfram Database is huge and has answers to almost every question you can think of. Programming the bots wasn't hard either. We just had to set up the user input and have the user input be the question. Its just like googling something on the internet. Like with the chat bots, with enough time and experience we could make the bot answer everything about everyone.

Here is a picture of the FactBot Code
Here is a picture of the FactBot answering a question

Watson: The Smartest Machine on Earth

Watson is a machine built by IBM to play Jeopardy. Should be pretty simple right, all it has to do if see the question and find the answer.It turns out it is extremely hard for Watson to play. Many questions in Jeopardy are puns or a play on words. Computers cant recognise these things like humans can. Computers are good at understanding factual things, such as math problems. Watson finds the answer to Jeopardy questions by searching a huge database using key words from the questions. It then narrows down the answers and chooses the most probable one. However it can make some awkward mistakes. There was a question asking about the first lady, and Watson chose the answer Richard Nixon. Obviously this is incorrect and any human contestant would instantly get rid of that choice. Watson only has key words to rely on, yet it turns out that that was reliable enough. A new process was implemented called Machine Learning. This helps the computer recognise patterns in past questions, and it uses these patterns to answer. Something a human cant do. Overall Watson is an amazing machine, that took 4 years, and lots of money to make. Yet this is still a huge step forward for AI programming.

Here is a picture of Watson

Rock Paper Scissors

The next project we stated to work on was Games involving AIs. The first game we made was Rock, Paper, Scissors. A very simple game where the AI had to do nothing but pick a random string. These strings were Rock, Paper, or Scissors. From there all you had to do was compare the users choice to the computers one to determine who had won.

Here is a picture of my code for RPS

After mastering the simple game i decided to make it more interesting by having the computer always beat you. This was also fairly simple, having the computer take your input and choose the appropriate option to beat you. The only way to beat the computer in RPS was to choose gun, something that isn't prompted to you when your told to pick.

Here is a picture of RPS
The first line tells you what each number corresponds to. The second one tells you to pick. The third tells you what the computer pick. Finally the forth one tells you if you won ,lost, or drew the game


After rock, paper, scissors we worked on another game. Hangman, this game was a lot tougher then RPS. It required tons more code and was a lot more complicated. there were tons of bugs I had to fix. One of the biggest problems was getting the variables to work with multiple functions. In the end i had to make most of them into arrays for them to become global. The other thing i had to do, was import variables into functions. Despite eventually getting it working, i ran into many errors and bugs during programming. The first of which was the variables not being read by all the functions. I had to make them into arrays and use them instead of variables.

That is how i got the variables to become global and work for all functions.

Here is a picture of Hangman code

Tic Tac Toe

For the grand finale we had to make a Tic Tac Toe game. This is even more complicated the hangman because the AI system and the conditionals are much more advanced. For example, you need to program the AI to block your moves, and you do this by making it run through a function. This function is shown below.

This function does a couple of things. The first is that it makes variables, these variables are need to make the AI block properly. Essentially, when two X's are placed in a row, it changes the variable telling the computer to place an O in the final slot blocking off the player. The other thing the function does is make the computer take a random move if i cant win, or block. Here is an example game.

I won the game by giving myself two options to win with, the computer could only block one, so i used the other one and won the game. Another thing that needed to be programmed in was the board. A fairly simple task which involved several strings, and arrays. Arrays are lists of variables. However the board was also fairly buggy. You needed to be careful about adding in ' quotations for if added wrong it completely broke the whole program. By Thursday i had one final bug to fix. This final bug was causing huge problems, making the computer stop placing tiles after a few turns. Essentially if it couldn't block or win, it wouldn't work. I started to trouble shoot seeing if all my commands were running. They all were so i moved onto the array. It turns out the command had stopped placing down pieces on the board. To fix this i had to run through all the commands effecting computer movement. The bug ended up being a very small glitch. The code is supposed to make the computer play randomly if it can't block or win, and the code wasn't running the random function. After sorting out this bug i had a fully functional TicTacToe game with a two player version and an AI.