This is a small tool I wrote to check the validity of logical expressions. It takes as an input one or more logical expressions like, for example the following:
(A and not B) implies C
C-style operators and constants are, of course, also supported.
A && (B || false)
The program will then parse the expressions, take all variables within them, create a truth table containing any possible combination of variable values and print them out.
Then, if multiple expressions were given, it will also compare the results obtained from the given expressions and point out the differences.
I found this tool to be extremely useful for correcting exercises done by other students. Or you could use it to check your AI conditions for correct behavior. Or maybe something else, be creative!
As an example, if you were to give the two expressions above as input (no, I don’t know why you would do that), you would receive the following output:
You can download the tool right here, there are some example files (test_*.txt) included, you can just drag & drop them onto the .exe file to have them evaluated.