# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
# ---

# # The Sandpit
#
# The supervisor of a building site has dropped their mobile phone into a pit with an uneven floor, and it has rolled to the lowest point.
# To make matters worse, the pit has subsequently been filled with sand such that the phone is covered and cannot be seen.
# To find where in the pit their phone is, the supervisor has crafted a *‘dip-stick’* with a head designed to measure the slope of the floor if it is poked straight down through the sand.

# ## Jacobian
#
# Try and find the supervisor's phone by clicking on any point in the sandpit, thereby measuring the negative of the Jacobian at that point $-\mathbf{J} = -\nabla f(\mathbf{x})$  
# Try to do this with as few dips as possible!

# Click into this cell and press [Shift-Enter] to start.
# %run "./sandpit-exercises.ipynb"
sandpit_intro()

# ## Depth Only
# Try and find the supervisor's phone only measure the depth on each dip, without information about the Jacobian.

# Click into this cell and press [Shift-Enter] to continue.
# %run "./sandpit-exercises.ipynb"
sandpit_depth_only()

# ## Random Sandpits
#
# You can run this example as many times as you like for a randomly generated sandpit.

# Click into this cell and press [Shift-Enter] to continue.
# %run "./sandpit-exercises.ipynb"
sandpit_random()

# ## Multiple Minima
# In this sandpit, there are many local minima that the supervisor's phone could have fallen into.
# The phone is in the deepest one - Try and find it!
#
# (You may get lucky and find the basin of the deepest minimum quickly, if you seem stuck, click somewhere else at random!)

# Click into this cell and press [Shift-Enter] to start.
# %run "./sandpit-exercises.ipynb"
sandpit_multiple_minima()

# ## Noisy Functions
#
# Before the sand was loaded into this next pit, the pit floor was covered with rocks.
# This means when the supervisor tries to measure the slope, the surface they measure is rough and can change quickly.
#
# Try to find the phone in this situation. You may notice that it is frustratingly harder to do so, as the roughness may generate more local minima.

# Click into this cell and press [Shift-Enter] to continue.
# %run "./sandpit-exercises.ipynb"
sandpit_rocks()

# ## Narrow Wells
#
# In this pit, there is a deep but narrow well that the phone may have fallen into.
# See if you can find the phone in this case.

# Click into this cell and press [Shift-Enter] to continue.
# %run "./sandpit-exercises.ipynb"
sandpit_well()



StarcoderdataJupyterScriptsDedupFiltered