# Artificial Intelligence Methods Extra Assignment School of Computer Science

## Artificial Intelligence Methods Extra Assignment School of Computer Science

3 points Western Illinois University

Professor: Byoung Jik Lee Due: 5 pm, 12/10/2020

_____________________________________________________________________________________

Program to train the Perceptron Model to simulate the following operations. The initial weights, learning

coefficient, and threshold for each operation are given. Through your training process, your program

should print the followings from the initial status to the final weights for each operation.

• target output • actual output • updated weights

If you can’t get the correct final weights within 10th epochs, you stop at 11st epoch and print the final

weights and actual output.

(1). Simulate OR operation. There are two input units and one output unit. Input patterns are (0, 0), (0, 1),

(1, 0), and (1, 1). The output will be either 1 or 0. The given parameters are as follows;

1. Initial weights are given as 0.35 and 0.45 2. Learning coefficient is 0.9 3. Threshold value is 5.5

(2). Simulate NOR operation. There are two input units and one output unit. Input patterns are (0, 0), (0,

1), (1, 0), and (1, 1). The output will be either 1 or 0. The given parameters are as follows;

1. Initial weights are given as 0.9 and 0.5 2. Learning coefficient is 0.8 3. Threshold value is -1.5

(3). Simulate XOR (exclusive or) operation. There are two input units and one output unit. Input

patterns are (0, 0), (0, 1), (1, 0), and (1, 1). The output will be either 1 or 0. The given parameters are

as follows;

1. Initial weights are given as 0.5 and 0.2 2. Learning coefficient is 0.7 3. Threshold value is 2

Submit the following files through Western Online.

• source code file • source code list • your output list printed by running your program.