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.py
script working on your system. Save the script and a screenshot named checkin2.png
to your repository folder, commit, and push.test-demos
folder 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 unittest
module as I demonstrated in stringops.py
. Commit your updated matchdna.py
to your gitlab project.agents.py
, so run that to do the following tests. Save your answers and notes to the file c4bandit.txt
in 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.exploreRate
is set to 0.6
. Try a few numbers larger and a few smaller. What is the relationship between exploreRate
and the average reward? Leave exploreRate
set to the best value you found.argmax
in the exploit code. This finds the index of the largest estimated value. But what if there’s a tie? argmax
will 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?