P3 A basic wooden railway set contains the pieces shown in Figure 3 The task is to connect these pieces into a railway that has no overlapping tracks and no loose ends where a train could run off onto the floor.


I don't know how to implement the problem in Python, I have AIMA framework, and I have to use Depth First Search, but I have no idea how to implements the code.

  • $\begingroup$ It is not obvious that an AI approach is a good choice here. Is this a homework assignment? $\endgroup$ – DrMcCleod Jun 8 '19 at 17:19
  • $\begingroup$ Yes, it is. :)) $\endgroup$ – Artur Bozieac Jun 15 '19 at 23:01
  • $\begingroup$ Programming issues are off-topic here. Please, read ai.stackexchange.com/help/on-topic for more details and to understand which questions are on-topic here. If you have a programming issue, the best place to ask your question is Stack Overflow. $\endgroup$ – nbro Jun 2 at 22:44

Browse other questions tagged or ask your own question.