Symptom Medications Headache H1, H2, H3 Runny nose R1, R2 Fever F1, F2 Sore throat S1, S2Assume also that the FDA has found that each the following sets of medications presents dangerous drug interactions and so drugs in each set should not be prescribed together.
---------- M2 ------------ | Headache |------------------| Runny Nose | ---------- ------------ | M1 | | | ------------- ------- | Sore Throat |------------------| Fever | ------------- M3 ------- M1 | S1 S2 M2 | R1 R2 M3 | F1 F2 ------------- ------------- ------------- H1 | 0 0 H1 | 1 1 S1 | 0 1 H2 | 0 1 H2 | 1 0 S2 | 1 0 H3 | 1 0 H3 | 1 1
During this stage of the process, arcs are revised to eliminate values that will no longer be valid due to Lucy's allergies. We revise below the domain of each of the variables:
The search is quite simple since the reduced domain of each variable contains just one value. The only possible solution is {H3,R1,F2,S1}. Selecting the variables in any order will lead to the same valid solution in the same amount of time.
Prove the conclusion from the axioms by refutation using resolution:
- equal(x,x)
- !equal(y,z) or equal(z,y)
- ![equal(w,s) and equal(s,t)] or equal(w,t) !equal(w,s) or !equal(s,t) or equal(w,t)
- equal(b,a)
- equal(b,c)
- (negated conclusion:) !equal(c,a)
2. !equal(y,z) or equal(z,y) 5. equal(b,c) --------------------------------------------- 7. equal(c,b) substituting y by b, and z by c. 7. equal(c,b) 3. !equal(w,s) or !equal(s,t) or equal(w,t) --------------------------------------------- 8. !equal(b,t) or equal(c,t) substituting w by c, and s by b. 8. !equal(b,t) or equal(c,t) 4. equal(b,a) --------------------------------------------- 9. equal(c,a) substituting t by a. 9. equal(c,a) 6. !equal(c,a) ---------------- EMPTY CLAUSE
The following table contains training examples that help a robot janitor predict whether or not an office contains a recycling bin.
STATUS | DEPT. | OFFICE SIZE | RECYCLING BIN? | |
1. | faculty | ee | large | no |
2. | staff | ee | small | no |
3. | faculty | cs | medium | yes |
4. | student | ee | large | yes |
5. | staff | cs | medium | no |
6. | faculty | cs | large | yes |
7. | student | ee | small | yes |
8. | staff | cs | medium | no |
x 1 2/3 1/3 1/2 --------------------------------------- log_2(x) 0 -0.6 -1.6 -1
IF status=faculty AND dept=ee THEN recycling-bin=no IF status=faculty AND dept=cs THEN recycling-bin=yes IF status=staff THEN recycling-bin=no IF status=student THEN recycling-bin=yes
A B Desired Output 0 0 1 1 0 0 0 1 0 1 1 1
This function cannot be computed using a single perceptron since the function is not linearly separable: B ^ | 0 1 | | ---1----0--------> | A
Only one hidden layer is needed since this is a boolean function and one hidden layer is sufficient to represent any boolean function.
I'll use just two hidden units since the function seems simple enough.
4 connecting the input layer to the hidden layer + 2 connecting the hidden layer to the output layer The 3 links connecting the fixed input -1 to each of the units can also be taken into account here.
-1 | V --- -1 A ------>| C | --------- | \ / --- | v \ / | --- \/ --> | E | /\ --> --- / \ | / \ --- | B ------>| D | --------- --- ^ | -1 input hidden output layer layer layer
I would select small (i.e. close to 0), random values.
The algorithm will iterate the following set of steps:
The following are possible stopping criteria:
I would run the error back propagation again modifying the parameters to correct what seems to be the problem with the current application of the procedure:
Individuals Rank Rank Fitness ----------------------------------------- C1 1st 0.25 C2 2nd 0.1875 = 0.25*(1-0.25) C3 3rd 0.140625 = 0.25*(1-0.4375) C4 4th 0.1054687 = 0.25*(1-0.578125) C5 5th 0.3164063 = 1-0.6835937 Note that:
That the probability of selecting the least fit element (i.e. C5) is greater than the probabilities of selecting any of the other (fitter) individuals.
Pick the constant p strictly greater than 0.5. In that way, it is guaranteed that the rank fitness is a monotonicly decreasing function of the rank, since each individual will consume, in turn, at least half of the remaining probability.