Tuesday, December 16, 2008

ICA-CP: 12/16/08 - Last day of class for S1

Today, your Eliza programs are due. Even if you have not finished writing the program, turn in your Eliza Check-Off List with a printout of your Java code attached.

If your program does not compile, it means the compiler does not think your Java code has correct syntax and is confused. Here's one reference to Java syntax: http://en.wikipedia.org/wiki/Java_syntax In our class blog, we covered if statements on 10/22/08.

See you next year!

Wednesday, December 10, 2008

Class Summary 12/10/08: Definition of arrays

State:
An array is a data structure for storing data of the same type.

Elaborate:
An array is declared by listing the data type followed a set of square brackets, then the name of the array. For example, to create an array of type string called names, we would use this line:

string [] names;

To declare and fill a string array, we would list the contents after declaring the array:

String [] names = ("Huey", "Dewey", "Louie");

Exemplify:
An array is like a set of lockers, each being numbered successively. For example, if we want an array of 8 items, it would be like having a row of lockers numbered 0, 1, 2, 3, 4, 5, 6, and 7. What goes inside is our data. For example, if we have an array with three names: Huey, Dewey, and Louie, the array would have:
1) Huey in locker 0.
2) Dewey in locker 1.
3) Louie in locker 2.

In Java, the array would have
1) Huey in names[0]
2) Dewey in names[1]
3) Louie in names[2]

Illustrate
So, arrays are like rows of lockers. Each row has a unique name. Each locker in a row has a unique number.

ICA-CP: 12/10/08 - CASE Parrot program to create Eliza

Today we reviewed the parrot program each of you did at the beginning of the school year. In order to create the Eliza program, modify your parrot program. A couple of notes from the line by line analysis we did on the parrot program today:

1) The == symbol compares variables of type boolean, int, and double data types
2) The .equals method, as in userAnswer.equals(Done), compares two String variables
3) The word "final", as in Final String Finished = "Done"; , makes the variable into a constant so that the value can never be changed from "Done".

Monday, December 08, 2008

12/8/2008 - Happy birthdays!

Good afternoon!

Today we are celebrating birthdays, including ICAs Immaculate Conception celebration! Since today is a pizza party day, we will write an algorithm for ordering pizza online, paying for the delivery, and eating it.

First, a new tech word for today: deconstruction
Deconstruction involves breaking a task down into subtasks, and breaking down subtasks into step-by-step instructions. The subtasks and step-by-step activities are used to create an alogoritym.

Today's assignment (worth 50 points):
Write the algorithm for ordering a pizza online, paying for the delivery, and then eating the pizza. Be sure you identify the 3 major sub-tasks (10 points), and then list the steps under each subtask (30 points).

Thursday, December 04, 2008

ICA-CP: 12/3/2008 - Eliza

Good morning!

We are doing our own versions of the Eliza program for our semster project. You have 5 classes, including today, to finish your project. In order for your project to be checked-off as "turned-in", you must do three things:

1) Run it and get your check-off sheet signed.
2) Turn in your check-off sheet with your 7 emotive words per person along with their responses, the algorithm, your pseudo-code, and a printout of your source code.

We are writing the Eliza program in stages:
Stage 1: Write your 7 emotive words per person along with their responses
Stage 2: Write the algorithm, or set of rules, which your program will follow.
Stage 3: Write pseudo-code based on your algorithm.
Stage 4: Code your program in blueJ.

Your completed code will be evaluated as follows:
Basic program (worth 150 points maximum): The user types an emotive word and your program returns an answer. The user may repeat typing of words and your program will continue to give answers until the user enters the word, Done. You include screen instructions to the user on how your program runs. Your program handles words which are not one of your special emotive words by printing something to the user and NOT freezing. The user enters only a single word.

Intermediate program (worth 175 points maximum): You complete all of the basic level requirements. Additionally, you implement your list of words and responses with two String datatype lists. The user enters only a single word.

Advanced program (worth 200 points maximum): You do the intermediate level program with two lists. Also, the user may enter whole sentences, and you use StringTokenizer to evaluate each word individually for an emotive word.

Question of the Week: Due 12/12/2008

[This question of the week is the last one for the semester. It must be 500 words or greater in length. It is due by 5:00 PM on Friday, 12/12/2008.]


You have run Eliza, one of the first artificial intelligence programs. You know some of its shortcomings now. The question of the week is: Will computers ever be able to act like humans and possess human intelligence?

Some background info: Dr. Alan Turing proposed a test to identify whether a computer possessed human intelligence. You have a human in one room and a computer or robot in another. You don't know which is in which room. You can only hear their answers. You ask questions of both. If you cannot tell the difference between the human and the computer by their answers, then the computer is said to possess human intelligence. For more info from Wikipedia, check here: http://en.wikipedia.org/wiki/Turing_test

Tuesday, December 02, 2008

Question of the Week: Due 12/5/2008

[250 words are due by 5:00 PM on Friday, 12/5/2008.]


Here's the question: Do you think that using other's wireless access to the internet without telling or asking them is OK? Or, do you think that the owner of the wireless access should take steps to secure it? What is the danger from hackers.

Background: Yesterday, I helped a friend set up her new office and brand new laptop. However, her DSL line was not yet ready. So, we went looking around for wireless connections that were not secured with a password -- and we "borrowed" the wireless Internet of a neighboring law firm. The law firm did not have a pasword on the wireless. Others in the neighbor hood were not passworded also.

Here are some references:

http://news.zdnet.com/2110-1035_22-176189.html?tag=nl.e550

http://www.cbsnews.com/stories/2005/07/07/tech/main707361.shtml

http://www.slate.com/id/2109941/

http://money.cnn.com/2005/08/08/technology/personaltech/internet_piracy/index.htm

http://www.computerworld.com/action/article.do?command=viewArticleBasic&taxonomyName=standards_and_legal_issues&articleId=323773&taxonomyId=146&intsrc=kc_feat

ICA-CP: 12/2/08 - Eliza

Good morning!

It's good to be back!!! Today, we are starting something new - Eliza. Eliza was one of the first artificial intelligence programs written. You have video games today because Eliza was written. For more info on Eliza, see this Wikipedia article: http://en.wikipedia.org/wiki/ELIZA

I want you to evaluate the Eliza program. You may work in teams of two. Use SEXI to explain what Eliza is, and also list what you like and what you would change in the program. Also, do the activities and answer the questions in Part I of the lab at this web site:
http://www.ugrad.cs.ubc.ca/~cs101/2008W1/Labs/Eliza/

Here is the location of Eliza on the Internet to use:

http://www-ai.ijs.si/eliza/eliza.html

Sarcastic Eliza: http://www.ndir.com/ai/bad.html\

Ellaz was voted best Eliza-type bot: http://www.ellaz.com/EllaASP8/Direct.aspx