0
$\begingroup$

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.

https://cdn.discordapp.com/attachments/586652526728970240/586689632092291082/Pieces.PNG

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.

$\endgroup$
  • $\begingroup$ It is not obvious that an AI approach is a good choice here. Is this a homework assignment? $\endgroup$ – DrMcCleod Jun 8 at 17:19
  • $\begingroup$ Yes, it is. :)) $\endgroup$ – Artur Bozieac Jun 15 at 23:01
-2
$\begingroup$

The difference between artificial intelligence and normal computer programming is, that the tools are different. Normal computer programming is about coding a given algorithm into sourcecode. A possible problem is, that somebody is using the wrong programming language, has forgotten to end a statement with a comma, or doesn't know how to search in a tree for a node. All these problems can be solved within the normal paradigm.

In contrast, the AI topic is dealing with inventing new algorithms. That means, that the algorithm is unclear. And the best practice method in describing problems is to figure out which literature is available which is describing the bottleneck. In this special case with finding a plan for putting railway elements together the fist step is to analyze why Depth-First-Search won't work, and in which paper this problem was addressed in the past. If the problem is completely new, then a paper has to identified which is describing a similar domain. For example a paper about heuristics for hierarchical path-planning.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.