I too built one of these in my youth (when I was 8 or so); I found it a pleasant inspiration and inspired me trying to do it for checkers (which, needless to say, had too many states, and failed). Are there other such mechanical examples of machine learning with which to inspire young people?
https://xkcd.com/832/