Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

plan2a

  • 3 years ago

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?

  • This Question is Open
  1. Comm.Dan
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    It depends on how old the computer is, meaning the speed of the computer @plan2a

  2. rsmith6559
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 3

    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.

  3. plan2a
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  4. bwCA
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    which course - 2008 or 2011?

  5. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy