In this case, the concept turns out to be relatively simple. Much simpler than the Wikipedia article suggests. Pretty much what would happen if you were at a real whiteboard, doing a step-by-step solution of the problem; but preserved as code, so that next time, it can run on its own.
- Each data-entry field is treated independently. One field, one whiteboard.
- Its whiteboard is in the form of a Python dictionary, so that each entry on the whiteboard is clearly and uniquely named. A few names are reserved, by convention, but you can name everything else as you see fit. (Almost) no restrictions on what you can put on the whiteboard.
- Each “expert” looks at the whiteboard, to read the item(s) it’s interested in (by name); write new item(s) (by name); and/or judge the result (“aye” or “nay”).
- Validation functions (“experts”) are called in sequence. Each only has to do a well-defined part of the job, so it’s simple and (potentially) reusable in similar validation/transformation jobs.
A few tricks are needed in a few cases, but that’s the view from 20,000 feet. The rest of it is just fitting it into Python, and into Anvil’s way of storing and triggering things. Both are remarkably well-suited for this sort of thing.
Although I designed this from scratch, Python has been used this way before. And I was introduced to the underlying ideas decades before Wikipedia.
No formal training in AI, but I did subscribe to a few print magazines back in the day
. Wanted to broaden my methods of thinking, as well as programming. And if that led to some programming shortcuts, so much the better.