January 2020
Intermediate to advanced
346 pages
9h 8m
English
For our example, we will use genetic programming to create a program that implements an even parity check. In this task, the possible values of the inputs are either 0 or 1. The output value should be 1 if the number of the inputs with the value 1 is odd, thereby producing a total even number of 1 values; otherwise, the output value should be 0. The following table lists the various possible combinations of input values for the case of three inputs, along with the matching even parity output values:
| in_0 | in_1 | in_2 | Even Parity |
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
This kind of table is often referred to as the truth table of the operation at hand. ...
Read now
Unlock full access