This is one of my homework in fact.
It use fout styles in the Software Architecture to implement the N-Queen problem:
User IO.pipe(doc) as the pipe to fetch and send data.And there is a mutli-thread version as well.
But both don't work very well when N is larger than 8. Some reasons I think is that Ruby limit the volumn in the pipe to 1M.
I just use recursion to implement it.
Yeah, Backtrack!
[Blackboard](http://en.wikipedia.org/wiki/Blackboard_(computing)
I use the observer in the ruby, you should require 'observer' and the doc can be refered..
I use the observer as the controller, use a Board class as the blackboard.
The controller observe the status of the board and notify the Warn class when there's change.'WarnGo' will work when the push action is ok, while 'WarnBack' will work when pop is needed.