A check-in is just a weekly opportunity to score some points and ensure that you are keeping up with the course content. The requirements vary from week to week, but may involve responding to a survey, taking a brief online quiz, or participating in a discussion. They are due by midnight on the designated day.
cartdemo.pyscript working on your system. Save the script and a screenshot named
checkin2.pngto your repository folder, commit, and push.
test-demosfolder of the public gitlab project). The function defined in that file has two doc tests that pass, but the function is actually full of bugs. Write several additional tests, and see if you can identify any of the bugs. You may either continue using doc tests, or switch to the
unittestmodule as I demonstrated in
stringops.py. Commit your updated
matchdna.pyto your gitlab project.
agents.py, so run that to do the following tests. Save your answers and notes to the file
c4bandit.txtin your repository.
NaiveGambler. What is its average reward?
BasicEstimatingGambler. What is its average reward?
BasicEstimatingGambler. Currently the gambler only updates its estimates when exploring. Add or move around code so it updates estimates when exploiting too. Does that improve the average reward?
self.exploreRateis set to
0.6. Try a few numbers larger and a few smaller. What is the relationship between
exploreRateand the average reward? Leave
exploreRateset to the best value you found.
argmaxin the exploit code. This finds the index of the largest estimated value. But what if there’s a tie?
argmaxwill always return the left-most index equal to the max. Try to use this technique to break ties randomly instead. Does that improve the average reward?