MHB Logo - Help the turtle escape the room

  • Thread starter Thread starter Yankel
  • Start date Start date
  • Tags Tags
    Escape
AI Thread Summary
In the Logo programming language scenario, a turtle is confined within a circle and programmed to move forward while turning right by 135 degrees upon nearing the white background. This behavior prevents the turtle from escaping the circle. The discussion centers on whether there exists a starting position for the turtle or its heading that would enable it to escape. It is concluded that if the turtle begins within a distance of half the square root of 2 from the center, it cannot escape. However, if positioned beyond this distance and directed towards a point at an angle of 135 degrees or less, the turtle can successfully escape the circle.
Yankel
Messages
390
Reaction score
0
Hello all,

I have a question, would like to have your opinion on the matter.

In the Logo programming language, I draw a red blue circle and put a turtle in it. I have specified that the turtle will move forward constantly, but, when approaching a white background (the page's background), it will turn right by 135 degrees. As a result, every time the turtle comes to exit the circle, it turns around and moved forward another way, staying in the circle. In this way the turtle never escapes the circle.

The question is: Is there a starting position (for the turtle itself and/or his head) that will allow him to escape?

Thank you !

View attachment 7237
 

Attachments

  • turtle.JPG
    turtle.JPG
    4.3 KB · Views: 115
Technology news on Phys.org
Yankel said:
Hello all,

I have a question, would like to have your opinion on the matter.

In the Logo programming language, I draw a red blue circle and put a turtle in it. I have specified that the turtle will move forward constantly, but, when approaching a white background (the page's background), it will turn right by 135 degrees. As a result, every time the turtle comes to exit the circle, it turns around and moved forward another way, staying in the circle. In this way the turtle never escapes the circle.

The question is: Is there a starting position (for the turtle itself and/or his head) that will allow him to escape?

Thank you !

Without loss of generality we can assume that the turtle escapes at the top.

\begin{tikzpicture}[>=stealth,shorten >=2pt,,shorten <=2pt]
\fill[cyan!50] circle (2);
\draw[help lines] (-3,-3) grid (3,3);
\draw circle (2);
\fill (0,2) circle (0.07);
\draw (2,0) -- (-1,3);
\draw[->, thick] (2,0) -- (0,2);
\draw[->, thick] (0,2) -- (2,2);
\draw[->] (0,2) +(62.5:0.7) node {$135^\circ$} +(135:1) arc (135:0:1);
\fill (0,0) circle (0.07);
\draw[<->] (0,0) -- node[below, xshift=4] {\small$\frac 12\sqrt 2$} (1,1);
\end{tikzpicture}

If the turtle starts somewhere on the first vector, or in the area that's above it, and moves to the top, it will escape.
And it's not possible to escape in 2 hits or more.

More generally, if the turtle is within distance $\frac 12 \sqrt 2$ of the center, it cannot escape.
And otherwise, it can escape, but only if it is directed at a point where the given angle is $135^\circ$ or less.
 
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
I am trying to run an .ipynb file and have installed Miniconda as well as created an environment as such -conda create -n <env_name> python=3.7 ipykernel jupyter I am assuming this is successful as I can activate this environment via the anaconda prompt and following command -conda activate <env_name> Then I downloaded and installed VS code and I am trying to edit an .ipynb file. I want to select a kernel, via VS Code but when I press the button on the upper right corner I am greeted...
Back
Top