Ask Programming Language Expert

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

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M93104826
  • Price:- $110

Guranteed 48 Hours Delivery, In Price:- $110

Have any Question?


Related Questions in Programming Language

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As