Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In matlab please. The second sample maze also includes the 16 turning points which are shown as hexagrams (h) with a blue edge and yellow

image text in transcribedIn matlab please.

The second sample maze also includes the 16 turning points which are shown as hexagrams (h) with a blue edge and yellow face. Let's add those now. Use exactly the name TP as we will use that in the solution engine. Turning Points: As the Pacman moves from the start to the end of the maze, it encounters 4 x 4 = 16 turning points, four in each of the four loops. Show each "turning point" using a yellow-filled hexagon for each. Here are the x and y values for the first four turning points. % Store and plot all eight turning points TP = [22.5 22.5 2.5 2.5; 2.5 22.5 22.5 12.5] % turning points in the first loop TP = [TP TP + (30;10]] % concatenate with TPs in the second loop Add a third line to add the 8 turning points in the third and fourth loop. You can just modify the last line changing [30;10] to 2*[30;10). The x-values are row 1 of the TP array. The y-values are row 2 of the TP array. Use plot to show all sixteen turning points as hexagons (h) with a 'MarkerSize' of 16. The 'MarkerEdgeColor" should be blue and the 'MarkerFaceColor" should be yellow. The second sample maze also includes the 16 turning points which are shown as hexagrams (h) with a blue edge and yellow face. Let's add those now. Use exactly the name TP as we will use that in the solution engine. Turning Points: As the Pacman moves from the start to the end of the maze, it encounters 4 x 4 = 16 turning points, four in each of the four loops. Show each "turning point" using a yellow-filled hexagon for each. Here are the x and y values for the first four turning points. % Store and plot all eight turning points TP = [22.5 22.5 2.5 2.5; 2.5 22.5 22.5 12.5] % turning points in the first loop TP = [TP TP + (30;10]] % concatenate with TPs in the second loop Add a third line to add the 8 turning points in the third and fourth loop. You can just modify the last line changing [30;10] to 2*[30;10). The x-values are row 1 of the TP array. The y-values are row 2 of the TP array. Use plot to show all sixteen turning points as hexagons (h) with a 'MarkerSize' of 16. The 'MarkerEdgeColor" should be blue and the 'MarkerFaceColor" should be yellow

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

2. How will the team select a leader?

Answered: 1 week ago