This is fully compatible to binary logic, but practically problems can be expressed much more compact and clear.Search the net for fuzzy logic. It's fun, very powerful and has wide appliance potential. You'll like it, I promise. ;)
Search the net for fuzzy logic. It's fun, very powerful and has wide appliance potential. You'll like it, I promise. ;)
Don't forget spin: you can store twice as much info if you reverse the direction of the disc's rotation.
MarkMLl
I already published ternary and fuzzy logic on this forum.
See here:
https://forum.lazarus.freepascal.org/index.php/topic,41144.msg290876.html#msg290876
https://forum.lazarus.freepascal.org/index.php/topic,41144.msg295325.html#msg295325 and the Zadeh fuzzer in the next post.
I also posted a five way logic.:
https://forum.lazarus.freepascal.org/index.php/topic,41144.msg290987.html#msg290987
I did do quite some improvements later, but these are the basics. Can put it in a library if you want and submit to the RTL maintainers.
These can all be basic on bit packed sets as well, except Zadeh's classic fuzzer.
I'd prefer -1,0,1 so it becomes balanced.
This has an advantage for ternary
Don't forget spin: you can store twice as much info if you reverse the direction of the disc's rotation.
I would write a case instead of if then.IOW, the normal Boolean is still base. Language doesn't know about ternary logic (in it's core).
And since a ternary operation can be compared to the ternary value and as such translates to a normal boolean there is no problem with loops that need a Boolean value to resolve.Comparison is the key....that leads to a normal Boolean.
repeat //do something that sets a ternary value until ternaryvalue=T{ternarytrue}
Also unknown, true or false? :)At least for the logic I used (Kleene and Priest), the theory for that is clearly defined.