Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 5 Create a Final-Location Simulation In this problem, you will define a function runSimulation3 that runs numTrials trials of a single-walk simulation by some

Problem 5 Create a Final-Location Simulation In this problem, you will define a function runSimulation3 that runs numTrials trials of a single-walk simulation by some drunk from any of the DrunkKinds in a DirtyField. The length of the single-walk simulation must have numSteps. The dirty field must have dirtyTiles number of dirty tiles which are located randomly within fXLimit and fYLimit as the limits of the xy axes. For each trial, you should create a new DirtyField and start the drunk at location (0,0). The simulation should plot the distribution of all of the final locations for the single-walk simulations across the multiple simulation trials. The plot should also display the the mean numbers of (x,y) distances between the final locations and the start location (0,0) across the multiple trials of the single-walks. Your plotted picture should be similar to the picture provided below. Hint: You should reference the lecture code that addresses similar task. Note that you should identify which part of the lecture code that addresses a similar problem to this one. Then, you need to make some revision so that the code is able to resolve this problem. Feel free to ask if you have any questions or problems.

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

Step: 3

blur-text-image

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

i need 1 0 7 .

Answered: 1 week ago