A1 was released a little while ago, and I've been working on parts of it here and there. So far, the assignment seems pretty straightforward: finish the code in TOAHModel, get a console version of the game running, then actually write a method to solve the game using as few steps as possible. Most of TOAHModel has been finished (the method headers, actual implementation), and not many errors were encountered on the way, which is really good considering how frustrating it is to look over every line of code hoping to find the mistake.
The _cheese_at docstring could have been much clearer--I didn't really know what it was asking for at first and I'm still not sure when to call the method. Right now, the only thing left to do in TOAHModel is to finish writing the number_of_moves method; in principle, it should be easy to write it: just return the length of the MoveSequence associated with the TOAHModel object. For some reason, however, I can't wrap my head around how to actually declare MoveSequence within the __init__ method (to be more precise, what should the argument be?). Hopefully, I'll manage to figure this out within the next couple of days...not very worried about this since I understand the problem.
What I am sort of worried about though is how to write the solution to this problem. In class, Heap mentioned that the code for Tour did not necessarily need to have recursion (although having it definitely makes it easier)--I would love to be able to see how someone might do this once A1's handed in. Still, the thought of this method makes my head spin, so I'm trying to steer clear of thinking about this until I have to (or maybe it's because I want to avoid using my brain??).
No comments:
Post a Comment