Body: <p>I have this problem.</p>
  <blockquote>
  <p>A basic wooden railway set contains the pieces shown in Figure 3.32.</p>
  <p><a href="https://i.sstatic.net/ObU7H.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ObU7H.png" alt="enter image description here" /></a></p>
  <p>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.</p>
  <p>a. Suppose that the pieces fit together exactly with no slack. Give a precise formulation of the task as a search problem.</p>
  <p>b. Identify a suitable uninformed search algorithm for this task and explain your choice.</p>
  </blockquote>
  <p>I know I have to use a DFS for this problem. But how do I know all the pieces are connected. The last one and the first one are connected.</p>
  <p>Can someone help me with some tips on how to solve this problem and implement it (in Python)?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-10T13:46:25.310Z
Comments.Text: Hi and welcome to AI! Can you provide a more **descriptive** title? Put your main question in the title!
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-10T13:54:52.143Z
Comments.Text: Also, note that if you're asking us to write code, your question is likely off-topic here. Programming questions are off-topic. See https://ai.stackexchange.com/help/on-topic for more details. I suggest you revise your post to ask a question that is on-topic.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-10T14:04:16.763Z
Comments.Text: Where did you take this exercise from? Which book?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-10T14:07:51.083Z
Comments.Text: I'm not asking for you to write code, just to help me write it with some tips. I don't exactly know which book, the professor gave us this assignment in a PDF, but I think I can find the book on google.
Comments.UserDisplayName: rucarr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-10T14:09:56.980Z
Comments.Text: ARTIFICIAL INTELLIGENCE: A MODERN APPROACH, THIRD EDITION, I think that's it.
Comments.UserDisplayName: rucarr
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-14T22:01:00.777Z
Comments.Text: Ideally an answer here would be theoretical, only touching on Python specifically if the API has special functions.  (PS it's a good problem--my young nephew struggles with this very issue, often having a tantrum if he can't get it all to fit;)
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-16T23:18:08.370Z
Comments.Text: I forgot to specify, i have AIMA framework
Comments.UserDisplayName: rucarr
Tags: <ai-design><python><search>
Title: Wooden railway search problem AI
UserDisplayName: rucarr
ThreadText: # Wooden railway search problem AI
  
  (Asked by: username_0 on 2020-05-10)
  
  I have this problem.
  
  > A basic wooden railway set contains the pieces shown in Figure 3.32.
  >
  > [![enter image description here](https://i.sstatic.net/ObU7H.png)](https://i.sstatic.net/ObU7H.png)
  >
  > 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.
  >
  > a. Suppose that the pieces fit together exactly with no slack. Give a precise formulation of the task as a search problem.
  >
  > b. Identify a suitable uninformed search algorithm for this task and explain your choice.
  
  I know I have to use a DFS for this problem. But how do I know all the pieces are connected. The last one and the first one are connected.
  
  Can someone help me with some tips on how to solve this problem and implement it (in Python)?
  
  **Tags:** ai-design, python, search
  
  > **Comments:**
  > **username_1**: Hi and welcome to AI! Can you provide a more **descriptive** title? Put your main question in the title!  
  > **username_1**: Also, note that if you're asking us to write code, your question is likely off-topic here. Programming questions are off-topic. See https://ai.stackexchange.com/help/on-topic for more details. I suggest you revise your post to ask a question that is on-topic.  
  > **username_1**: Where did you take this exercise from? Which book?  
  > **username_0**: I'm not asking for you to write code, just to help me write it with some tips. I don't exactly know which book, the professor gave us this assignment in a PDF, but I think I can find the book on google.  
  > **username_0**: ARTIFICIAL INTELLIGENCE: A MODERN APPROACH, THIRD EDITION, I think that's it.  
  > **username_2**: Ideally an answer here would be theoretical, only touching on Python specifically if the API has special functions.  (PS it's a good problem--my young nephew struggles with this very issue, often having a tantrum if he can't get it all to fit;)  
  > **username_0**: I forgot to specify, i have AIMA framework  
  
  ---
  
  ## 0 answers
  
  