Artificial Intelligence

The Turing Test

The Turing test is designed to guage a computer's ability to exhibit intelligent behavior, first developed by British mathematician Alan Turing.
The test has three participants: a human judge, a human subject, and a machine.
The judge engages in conversation with the human and the machine, and if the judge cannot determine who is the machine and who is the human, the machine is considered to have passed the Turing test.



The Chinese Room

The Chinese room is a thought experiment developed by American philosopher John Searle to contest some of the ideas about artificial intelligence. The general idea behind it is to pose the question: "Do intelligent responses indicate actual understanding?" Searle contests that a computer could be programmed to respond intelligently in conversation with humans---so much so that it would seem to be human itself--- but that it would not necessarily, or perhaps could not, actually understand what it was saying.
In this test, a person that speaks only English is put into a room with several reference and phrase books. Outide of the room are many Chinese - speaking individuals. The Chinese speaking individuals are instructed to write letters - in Chinese only - asking questions of the person in the room, and then send these letters to the English speaking individual via a small slot on the door. The English speaking individual is then instructed to respond to these letters using every book and reference in the room with them as they so please. They simply find the question that was asked of them in a book, and respond to it with the answer provided by copying the 'funny symbols' onto the paper and giving it to the Chinese Speaking individuals in the other room. When the Chinese individuals receive their responses, they of course believe that the person in the room can understand and speak Chinese perfectly, as the responses answer their questions pretty well.

For example:

Q: How are you?
A: I'm fine.

Q: What colour underwear are you wearing?
A: Blue.

In reality, the the person may not actually be completely fine (tired, hungry, etc.), or their underwear may be another colour entirely.
But the Chinese speakers think these answers are true, even though they were pulled from a textbook.
Basically, the point to the experiment is to show that the person in the room doesn't understand what they're saying,
but the Chinese people take the answers given to them as factual, and they think that the person in the room speaks Chinese perfectly.
More about the Chinese Room here and here




The Three Laws of Robotics

"The Three Laws of Robotics (often shortened to The Three Laws or Three Laws) are a set of rules devised by the science fiction author Isaac Asimov. The rules were introduced in his 1942 short story "Runaround", although they had been foreshadowed in a few earlier stories. The Three Laws are:

These laws were created by Asimov because they made robots more like humans - the robots would hold a sense of sympathy for humans, much like (the majority) of humans feel naturally.




Blade Runner

We watched a movie in class called "Blade Runner," which was produced 1982 and takes place in the near future, during the year of 2019. The movie was based off of the book - that goes by the same title - by Phillip K. Dick. It has to do with robots - called "Replicants" - that look and act like humans, and are used as slaves on other planets. Four of these Replicants escape to earth to find their creator and demand an extension to their life spans, which were only four years in length by default (as a saftey measure). The Blade Runner, a police officer who deals with executing - or "Retiring" - these Replicants, is hired to get rid of them. More on the movie The story raises a lot of questions about Artificial Intelligence and technology. How do the scientists in this story achieve technology so advanced that we can barely tell it apart from humans? Will Humanity ever get that far? One can never say for certain, but based on how quickly technology has been advancing thus far, I believe that it may be possible in the not too distant future. but that is beside the point~. (~ - 7-)~



(Reference the Three Laws Of Robotics)I knew about these laws long before having seen Blade Runner, and seeing the things that the Replicants did surprised me because of that.
But then again, the author of the original novel was extremely paranoid...



ChatBot

And on this day, I received a grim reminder that I am not very good at programming...

We began to program artificial intelligence using python. Our goal was to create a bot that could converse with the user. Of course, it had to sound as human as possible, so that it could be considered "intelligent". The program that we came up with involved simply preparing a variety of answers that could be used to answer a wide variety of questions.

this is the code I used:


and this is the "Chat Bot" when it's run~:


It doesn't exactly sound "human," per se... But everything can use improvement, yeah~?

The way it work is this: the robot asks the user if they have a question. If the user responds with a "y" (for "yes"), it proceeds to ask them what their question is. After the question is entered, the bot will choose between the various answers that have been prepared for it. And that's how you make artificial intelligence. I know, terrifying. oooh.
If the user's response to "do you have any other questions~?" is "n" ("no"), then the loop breaks and the program ends~.


I had also started making a chat bot that had all of the same basic things as the first, but could detect certain words and respond to the question with a different answer than what was set up for any question that doesn't have that/those words. It may sound more complicated than it actually is in that explanations... Allow me to show you~.:D

this is the code I used...


and this is the product it made~

there are a few bugs as of right now; It asks the user twice in a row if they have a question - that shouldn't happen. So I looked at the code for a while and played with it to see what needed to be adjusted...


On friday, I worked on the bugs in the program for a while. I was getting traceback errors that didn't make any sense and took me a moment to figure out... After a while I was able to fix and get around them. :D here's the fixed code:


and here is the working program:





Making Intelligent Games

Rock, Paper, Scissors

On the first day of week seven, my class and I began to work on 'intelligent' games, the first being Rock, Paper, Scissors.
This is the code that I used:



For the most part, the game does work, but sometimes it does this weird thing... where it just ends, and I can't play it anymore~.
I'm not sure why that is, but there is still time for me to fix it. ( - 7 - ) It's not complete junk though~~.
Here are a couple of examples from when it does function properly~.




So I think that adjusting the order of some of the text should fix it so that the program doesn't have these bugs~~~.
I also need to change the 'speech' that the computer says - so that it doesn't have those punctuation marks and such in it~~.

Hangman

On the same day, my class and I began to work on making a hangman game.
It didn't work very well once I had entered all of the code, however...
The game would reset every time a letter was entered, making it rather... impossible to play.
This is the code I used:



And once played, this is what the game looked like:



Now, there are quite a few problems with this code... But I supposed that I would get around to fixing it... maybe...

The following day, Mr. Farrell told the class about and showed us a pdf file that contained the information regarding making a properly functioning Hangman game~.
It was saved on his web page so that it would be easily accessed by all of us.
This is the code that I got from it:




When I ran it, it worked perfectly~~.
Here's what it looked like:






(for both the functioning and dysfunctional codes, I had the hangman icons above the rest of the code.
The hangman codes being the gallows and the others that had the different man's parts added to it~~.)




While making (a.k.a copying and slightly altering) the code for both the Paper Scissors and Hangman games, I learned how to function with lists, and with defining things without using a "def ...()" type of coding. I am fairly certain that this information will come in handy in the future, when I will make my game with my friend~~. (as long as I can remember how to function properly with all of these different codes and formatting and such. but then again, I do have this webpage to reference in the future...


Tic Tac Toe

When we fist began on this game, I was only slightly more than fearful as to how tedious the programming would be, as many of my upperclassmen constantly complaining and going on tangents saying that 'many tears would be shed'... Well, they were't completely proven to be correct, but they weren't completely incorrect. No tears were shed over this project. Not externally. Internally, however, I think I died. It wasn't so much that typing all of the code was difficult, it was that my hands can be very idiotic at times and muck up whatever it is that I am trying to type. That, along with the fact that I was given error messages when I would try to run the python file, and I couldn't always figure out what it was that I needed to fix. (Though I do suppose that that is why there is a 'search' option available for looking for key words and such~~. :D )
But anyways, on to the actual programming~.
We were told to first make a single player version of the game (playing against the computer, and then adjust it so that two individuals could play against one another. But honestly, I have not been feeling well at all, even in the slightest bit, and it has become increasingly difficult for me to focus on anything for extended amounts of time. And aside from that fact, I already have a terrible ability to focus on anything, and I am not very good at programming anyways. So it was kinda... difficult to program this week. But I did try. . . Uh, but I did make a Tic Tac Toe game, how ever buggy it may be... I based it of of what Mr. Farrell taught us and what I could find online... So it's not perfect, due to my complete and utter lack of understanding of the computer language. But, hey, it can do some things.
The code that I used is the following:







Well, the code does start properly... But when it comes to picking the move, it bugs out.
Which is a little more than irritating, because I don't know how to fix it.
And it does not help that I have terrible awkwardness and just cannot bring myself to approach my senpais and ask for help. The problem seems like it is something that could easily be fixed... but I do not want to ask. Just, no.
But anyways, this is what the game looks like when run:



And then it sometimes does this:



I suppose that these errors are my own fault, as I am the programmer, and I can go back and fix them... but I kinda am lazy and don't know how to function properly. . . *rolls away*
And then, as I went back to fix those errors, I made/discovered more...

There are several problems with the programs, but I have no idea how to fix them





Back to my home page
To My Server Project
To my Programming Page
To My Gaming Page
To my Robotics Page
To My circuits Page