Today was the final of Wazoku’s coding competition and I achieved second place. Which sounds great until you realise there were only three other entries. Fortunately for me it was a solid second place, and I think with a little bit more luck on the resources I was allocated at the start of the game it might have won. In the end I only lost on PR which is something I’d coded the AI code not to purchase as the reward of two customers wasn’t enough. Unfortunately my competitor got allocated one of the appropriate resources to to produce PR from the start, and my AIs eagerness to trade the other resource he needed (cash, due to me ignoring PR) gave him the win, despite me having more assets at the end of the game. If I had checked what other people were bidding for I could have made much smarter decisions on what to trade.
Looking through the code of the winner I can’t see anything obvious which makes PR a priority so I’m going to put the resource allocation at the start as being luck of the draw. It would have been nice if they’d done a best of five runs instead of just one for the winner. Although I have no doubt I still would have lost, it would have made me feel better. That being said, the winner was the deserved one, and after running through his code it’s obvious his AI made a lot smarter decisions on how it traded compared to how the AI I submitted traded. His AI did offer silly trades which my code didn’t such as offering nothing and requesting nothing, which gives me a certain sense of satisfaction, but this would have been a quick fix and overall the code they produced was of superior quality to the code I produced.
Things I enjoyed about the competition
- It gave me a fun way of learning/starting to learn a new language. I would recommend entering competitions to anyone who wants to learn something new.
- Through this blog I got to give direct feedback to the person who ran the competition and I’m pleased to say most of the suggestions I made were implemented.
- The game was actually fun and it was very disappointing that there weren’t very many entries at the end.
Things I didn’t enjoy
- Every other entry kept their code under wraps until the very end of the competition. I can understand their reasons for doing so as it means the other entries don’t get chance to test and compete. I was open with my code from the start in the hopes that it might encourage other people to learn and take part, which makes it even more impressive I came second.
- The lack of competition meant a lack of entries to learn from at the end. Again I’m not sure how best to get a better uptake in competitions, maybe a bigger prize. I know the person who ran the competition is planning to post a blog entry about things he learned which I shall read with interest.
Overall this was a fun learning experience, and I hope the lack of entries doesn’t put the company off running similar competitions in future, I for one look forwards to competing in the next one.