This week during class we learned about how to construct functions that can execute in a specific amount of time, as well as assertions. In order to make sure that our minimax function was able to do all of the required things, it is necessary to set up a few unittests to make sure that the expected result is returned.
Next we learned about deepcopy. We were given a few example of lists within lists which we had to copy and try to change just the copy in various ways. As it turned out, simply copying one layer of the list of lists would result in the original list to be changed as well. In order to solve this problem, we had to make a copy of the list and itterate over every sublist within the lists seperately in order for the original list to remain unchanged.
No comments:
Post a Comment