Title: Threads
I am entertaining a wild thought, not even sure if i am thinking right? Can we implement the solution using two threads?
 
Thread 1: Scans the breadth of the problem space, generates positions and stores them in a priority queue.
Thread 2 : Starts computing the solution, popping each position from the Q and trying to solve. If found System.exit(0)
 
The program will eventually exit when Thread 1 exists and still there is no solution. System.exit(1)
 
Is this a viable thing to attempt ( probably i will not get to it before due time )
 
Cheers
 
Sandeep

Sandeep -
        I'm not sure I understand what thread 2 is doing.
        To expand the search space, thread 1 must
pop the queue, expand the position (board) and
generate new positions (boards) which it enqueues.
        You could have multiple threads, each
of which is doing the same thing.  But this introduces
all the problems of multi-threaded programming
with a clear gain.

- jeff parker

Reply via email to