Itech1100 understanding the digital revolution - artificial


Overview

In this lab, you will explore artificial intelligence (AI) concepts and tools, using free software

Task Details

Task One - Explore Natural Language Parsing

1. Remind yourself of the basic parts of speech in English. eg what are nouns, verbs, pronouns and prepositions. In addition, you need to know that "A" is an Article in English, a type of Determiner.

2. Start the Prolog Sentence Parser.

3. Select the English Grammar Example
This example is a Prolog Program that parses an English sentence to generate a Tree that represents the grammatical structure of a simple sentence. Some of the grammar rules written in to this Program are:
A sentence is a noun phrase followed by a verb phrase
A noun phrase is a pronoun OR
A noun phrase is a determiner followed by a noun phrase OR
A noun phrase is a determiner followed by a noun followed by a preposition

You should see a screen like the one below.

Question 1. Identify the lines of Prolog that represents a sentence, and the three noun phrase rules?
4. Generate the Parse Tree for the Simple Sentence
On the bottom right of the screen press RUN. This will generate the Parse Tree below (note: due to a technical limitation the two "a"s are displayed incorrectly here. They should be under det)

Read the Parse tree starting from the top, left to right, and answer the following questions:

Question 2. Is the sentence grammatically correct according to the rules of grammar in the program?

Question 3. Swap John and saw. phrase(s(Tree), [saw, john, a, man, with, a, telescope]) and RUN. Is the sentence grammatically correct according to the rules of grammar in the program?

Question 4. Does it make sense that a relative simple program that encodes all the rules of a natural language can determine if any sentence is grammatically correct?

Task Two - Ancestors in Prolog

1. Restart Swish and this time Create a Program

2. Enter the Ancestor Rules as below on the right of the screen
Question 5. Write an English sentence that depicts what each fact and rule you have just entered means. eg father (john, jim) means that: John is Jim's father

Question 6. On the lower right side of the screen, ask Prolog to make the following inferences and record and explain the output
a) father( W, jim ).
b) father( x, jim ).
c) mother( jane, fred ).
d) mother( jane, jim ).
e) grandparent( jack, A ).

Task Three - Explore ELIZA

The ELIZA program, an interactive program that carried on a dialogue in English was originally written in 1965 by Joseph Weizenbaum. An online implementation by George Dunlop is at.

1. Engage in a dialogue with Eliza
2. View the code that generates a response by Viewing Page Source in your Browser. To do this in Google Chrome, while you have ELIZA on screen, Click on Customize and control Google Chrome icon in the upper right-hand side of the browser window. From the drop-down menu that appears, select More tools and then Developer tools, then View Page Source.

Question 7. Can you see anything in the ELIZA code that looks like Rules of Grammar? Explain.

3. IBM developed a Natural Language Understanding program called Watson, won the US TV Quiz, Jeopardy. Watson represents the cutting edge of natural language understanding. View the Watson YouTube video at https://www.youtube.com/watch?v=WFR3lOm_xhE

Task Four - Artificial Neural Networks

For this task, you'll use the TensorFlow Playground to explore Artificial Neural Networks (ANNs), starting with a simple perceptron model.
TensorFlow is a machine learning software library, developed by Google. This playground is not using TensorFlow, but it demonstrates some of the concepts underlying simple ANNs

1. Open the TensorFlow Playground Perceptron link from Moodle You should see a screen similar, if not identical to, the following:

This system lets you visualize the behaviour of an ANN. Notice that there are no hidden layers in this scenario - and so this network it is functioning in the same way as a single-neuron perceptron.
Some points to note:
- The DATA section allows you to choose problems to solve of different complexities. The aim of the neural network is to be able to classify the orange and blue dots correctly
- The Epoch shows you how many times the ANN has been presented with the entire set of training data
- The OUTPUT section shows the loss or error of the classification - it should ideally end up at zero
- The colour of the lines between inputs and neurons shows the magnitude and sign of the weights - blue is positive and orange negative

2. Select the "Gaussian" data if it's not already selected (the dataset in the above screenshot) and press the Play button to start learning
The "Gaussian" data set is linearly separable - you can draw a line between the two groups - and so a perceptron should be able to solve it pretty quickly

Question 8. How many epochs does it take for the perceptron to solve this problem? (You may need to restart the simulation and step through each epoch individually)

3. Now choose the XOR dataset (top right). What happens when the simple perceptron tries to learn this function?
(Note - if you've added additional features you might find the perceptron can learn this function)

4. Add a hidden layer to your neural network.
Question 9. How many neurons did your hidden layer require before it could reliably classify the points in the XOR pattern?

5. Create networks that will learn the Circle and Spiral datasets.
Hint 1: The ReLU activation function is faster to train with, and might speed up your results.
Hint 2: The learning rate parameter chooses how quickly to change the weights between neurons - try setting this high. What is the effect on the stability of the system?

Attachment:- Artificial Intelligence.rar

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Itech1100 understanding the digital revolution - artificial
Reference No:- TGS02910812

Expected delivery within 24 Hours