Artificial Intelligence

What is Artificial Intelligence?

To us, intelligence is the ability to acquire and apply knowledge and skills. But, artificial intelligence is different. Artificial Intelligence(AI)is the intelligence shown by machines or software. Howard Gardner believed that there was different types of intelligence based on our behavior. There was musical, spatical, logical, linguistic, and kinaesthetic intelligence.

Alan Turing

Alan Turing was a British pioneering computer scientist,mathematician,logician,and more. Overall, he was many things. Alan Turing was highly influential in the development of computer science. He created the Turing machine which can be considered a model of a general purpose computer.

Chatbot

Mr.Farrell had searched up chatbot and up came Mitsuku. It was a weird name for a chatbot. I chatted with Mitsuku and she said she lived in a Mousebreaker which was in Leeds which was in Yorkshire.

Day 2

On Tuesday, we created our own chatbot. We started yesterday but today was all about updating and finishing if you can. There were many 'if' statements to make sure that if someone said something, the chatbot would respond back in a certain way.

Rock, Paper, Scissors

After chatbot, Mr.Farrell showed us how you can make a rock, paper, scissors game in Python.

Day 3

Text to Speech

On Wednesday, we downloaded a Text to Speech program and eSpeak. Most of us had the Python module steel, so only some of us had to download it. We downloaded it so we can get our chatbots to "speak." After we imported it, all we had to do in Python was to type "engine.speak()"

Factbot

We also wanted to teach our chatbot to answer questions like it knew all its facts. We used the WolframAlpha website. We got our own app i.d but when we tried to put it in, it didn't work! So we stuck to the one that was already there. This was the code that was already in there.

The factbot knew most of the things I asked it.

Day 4

The Turing Test

On Thursday, we had our own Turing test. Guess what? Mine passed! I was chosen to be a human and I tricked my classmates into thinking it was a computer. When I was doing the Turing test, I thought of myself as a computer. So I had to think like the computer a little. It was fun and in the end, I got a cookie. (: The code that helped me the most was my questions. I had to act like it was the computer. So when someone asked a question that had certain key words in it, the computer would answer a certain way.

Day 5

Watson & Jeopardy

On Friday, we watched a video of the smartest machine in the world, named Watson. Watson came on to Jeopardy and was able to beat the two best contestants in Jeopardy. I learned that Watson has many data kept so when playing Jeopardy, they give little hints and Watson can figure out it out by looking at keywords.

War Games

After the documentary about Watson, we watched a movie called War Games. War Games is about a high school student hacking into a game company just to try and play their new game. Instead, he hacks into a military computer and plays a war game. United States against Russia.

Week Seven

Number Guessing Game

When we came back to Computer Science, we started off creating a Number Guessing Game. The goal was to guess the number the computer had. This was my code for the game to work:

I coded it so that when the human guessed a number, the computer would respond to it being higher or lower than the number. If the human guessed right, then the computer would answer "That's the number!"

Using this code, I was able to replay the game.

Hangman

On Tuesday, we made Hangman.

To start off the game, I put in the 'greet' function. This introduces the game and basically says hi to the user.

This function showed the computer choosing a word from a list and randomly choosing one.

This function showed the board/hanging man and the spaces. The first one basically said if the user guessed any letters that were wrong, the board would show a body part and the letter they guessed wrong. The second one showed the spaces. Basically, we would be able to know how many letters are in that word.

These two functions represented the letters of the word. The first one would just be a letter that the user put in. The second one was to check the letter. It would analyze the letter and determine if the letter was in the word or not.

If the user had 6 wrong guesses then the game would end. This is how the hanging man would look like if the user got 6 wrong guesses.

I used this game loop so the game could start all over again. This also means that there would be a new word for each game played.

Accessing the Web for Word Lists

I was ready with my game of Hangman on Wednesday. I played it multiple times but most of the words were repeating. I decided to look up word lists. I did not want to type hundreds and hundreds of words into python so instead I copied and pasted the link. I learned to use the urllib module in Python.

Tic Tac Toe

On Thursday, we started the Tic Tac Toe. I didn't get to finish mine but here is some parts of it.

This is the board of the Tic Tac Toe game.

To start off the game, the computer would greet the user. Once the user was greeted, the computer would ask if the user would like to go first. I had to create the function so if the user said yes, then the user would start. Otherwise, if the user said no, then the computer would start and the game would go.

Once the user was picked to start, they had to pick a move. The code basically said if the player was 'X' then they would print out 'It is X's turn." Otherwise, it would print out the other. When the user picked a number from the board to place their letter in, the computer had to put it in the right place. That is what the 'applyMove' function does. It gets the number that the user put in, and applies it to the board.

As you already know how the play Tic Tac Toe, you know that to win, you have to get three in a row. This function allows us to name all the possibilities of winning. So the user won from going straight across or straight down,etc.

I know that you can't always win/lose in Tic Tac Toe so I knew there had to be a tie function. This tie function would check the game and if there wasn't any possibilities of winning then it would be a tie.

On Friday,we fixed our code to make it a little bit more advanced than it was. This code would not let the player overwrite the computer's move. Also, we showed the computer the best moves to use in Tic Tac Toe.

Also on Friday, we watched Iron Man. Iron Man is about a CEO who gets kidnapped by these warlords. These warlords force Tony Stark(the CEO) to build them the powerful missiles that he had created. His plan turns into him creating an iron robot that he later calls Iron Man. He escapes the hiding place and comes back to his life and tries to shut down the weapon industry. He works to keep on creating and improving the Iron Man he thought of. In the end, he defeats his first Iron Man controlled by the leader of the warlords.