Document 7851387

Download Report

Transcript Document 7851387

Learning Combinational Logic

ECE 539 Final Project Marcel Wermeckes

Boolean equation input

 User enters boolean equations  Number of equations can be very large  Number of input variables arbitrary  Examples: F=A+B&(!C)+(B^D)&A G=B&C^(!(D&A))

Boolean functions supported

 AND &  OR +  XOR ^  NOT !

 Program follows precedence rules: A+B&D = A+(B&D)  All equations must have correct parentheses

Training

 Neural Network learns combinational logic through I/O patterns  Backpropagation Algorithm  One hidden layer  Parameters that can be set by user: • Momentum • Learning rate • Number of nodes in hidden layer • Number of training cycles/epochs

Testing

 After being trained, program will ask user for values of input variables and computes output  Compares all output patterns of boolean equations with output generated by Neural Network  Dumps errors to a file

Algorithm Implementation

 C++  dynamic  Type double for all calculations Input Hidden Output

Results

A&B^C+(A&B)^A A+((!B)+C&A) C+B^A M/BETA 0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

4.4888 3.2564 3.0933 3.0638 3.2359 2.3534 1.7565 1.9963 sum of square error 3 2 3 3 2 3 2 2 # of declassifications 4.1432 3.1614 3.1492

4 3 3 2.826 3.8468 2.2716 2.5425 0.6284

2 2 2 3 0 3.3972 2.8633 1.8838 2.5472

1.824 2.0634 1.7129 3.0407

3 2 1 2 2 2 0 2 3.3033 2.2766 1.9401 1.7036 1.6773 3.1617 2.2219 1.3605

3 2 1 3.4161 2.5792 1.9043

2 2 2 3 1 1.795 0.7371 1.0433 1.6727 1.0461

3 2 1 2 0 0 2 1 1.8456 2.9094 1.1415 1.6568 1.6911 1.1713 1.0004 0.8763

1 3 1 2 1 0 0 0 1.7897 1.1365 1.0116 0.3691 0.9576 1.5285 0.0237 1.0084

2 1 1 0 0 0 0 1 1.7409 1.5165 1.7551 0.0106 0.1139 0.5284

2 1 2 0 0 0 0.753 0.7659

0 1