Looks like Oleg has created an animals page on the wiki:
http://www.jsoftware.com/jwiki/Essays/AnimalsGame
I should also add that after sleeping on it, I thought
of a simple way of dealing with contradictory answers:
treat those answers as irrelevant.
In other words, instead of three valued logic (yes,
no, I don't know) use four values logic (yes, no,
unknown, irrelevant).
Fundamentally, a computer has no base of experience
on which to judge the correctness of any supplied values.
A person has a broad base of observations and uses
symbols to describe abstractions derived from those
observations. A computer just works with symbols.
Also, there are some questions where the answer can
validly be yes or no for some group of animals. For
example, consider the question 'Is it black? ' in
the case of a cat.
First, I'd change 'M' to 'U' to better signify that
the answer is unknown for that case. And I'd signify
irrelevant with 'I'. Logically, 'U', 'M' and 'I' are
all identical -- they are not 'Y' or 'N' so are treated
the same by comparisons with 'Y' and 'N'. However, for
merge, 'U' is superseded by 'Y' or 'N' while both
'Y' and 'N' are superseded by 'I'.
Second, I'd change the following definitions:
NB. invert yes/no/maybe truth value
not=: 'UNYI' {~ 'UYNI' i. ]
NB. merge yes/no/unknown/irrelevant values
merge=: ({&(>;:'UYNI YYII NINI IIII'))@((<@,"0)&('UYNI'i.]))
Finally, if I really cared about the correctness of the
system in the face of human mistakes, I'd do more normalization
on questions (and animals), I'd remove from consideration
any question which has no 'Y' or 'N' answers (since those
questions would, baring future changes, never be asked),
and I'd provide a utility to remove mistaken animals and
questions, and to replace bogus answers with corrected
answers.
FYI,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm