Hi! I finished writing the Problem Set 10, but it seems the computer player is quite slow. It took the computer player about 10 minutes to complete its turn. Is this normal?
It depends on how old the computer is, meaning the speed of the computer @plan2a
For that much slowness, check your code for nested loops. They can slow down execution a surprising amount. For instance if you've nested a "for i in xrange( 10 ):" inside the same for loop, you're executing the code block 100 times. A third nesting would execute 1000 times.
It seems like the problem calls me to implement the Problem Set 6's slow greedy algorithm, maybe I can implement the faster version of that algorithm, but that is kinda stepping out of what the problem is asking for. Well, there is no score keeping!, so I will implement it somehow and get back to you.
which course - 2008 or 2011?
Join our real-time social learning platform and learn together with your friends!