Despair.
That's what week 7 felt like.
No, not the content being difficult. The assignment.
Assignment 2 has officially made week 7 one of the most stressful weeks of the year. You see, the concept of the assignment is simple. Implement Tippy, and then program a strategy that will always win at it. Simple enough, right?
Wrong.
When implementing the function for Tippy that determines if the game is over or not, I ended up making a function that went well over 200 lines. It looked like a gigantic lightning bolt because of all of the loops I implemented. When I showed it to one of my partners, he looked at me in disbelief, asking how on Earth a function could possibly be that long, and maintaining that there must be a simpler way to do it. We eventually cut it down to a reasonable size, but it took a lot of modification to make the function somewhat presentable.
Minimax is a whole other beast. Understanding the concept gets you nowhere if you aren't 100% confident with how you're implementing it. One problem we had to avoid is an aliasing problem. When we broke down the initial Tippy gamestate into all of the possible gamestates, it altered our original gamestate and filled it with 'x's everywhere.
It seems like we still have a lot of work to do.
No comments:
Post a Comment