Today was mostly spent refining. I made a few modifications to my ai's get_move function to cut down on the time spent computing moves. For an empty board it could take ten to fifteen seconds to calculate a move. After adding a few shortcuts, it doesn't take more than two or three seconds to get any single move. I also added some much needed gui messages. Now it prints whose turn it is and a winner at the end. Before the game was a little confusing to play if you weren't used to it. One thing I want to work on next is seeing if I can't get the AI to play for a larger board. I tried running negamax for a 4x4 board but after twenty minutes it hadn't returned any results. This isn't a requirement, just something I'm curious about.
There was also a new apprentice event today. We met for a talk and afterwards were given a small pair homework assignment. The topic today was the observer pattern. The homework is to implement a stock that is held by a stock exchange and is reported on by a stock ticker. Whenever the stock updates its price, it sends a message to anything watching it and then goes about its business. The idea is that what is watching never has to ask for an update. These events seem like they'll be fun and a good way to work on stuff with the other apprentices.
No comments:
Post a Comment