« Code Wars Live Blog | Main | Programming outside the box – count to a million using 16 bits »



Feed You can follow this conversation by subscribing to the comment feed for this post.

I for one had a lot of fun, so many thanks to you for putting on the code war. I was curious if perhaps you could have a second category of code war next year: the previous year's game. That way students have a nice API to attempt a more complex AI with. While not as level a playing field, since people have varied schedules, it need not be anything more than the competition phase while people eat. I know I for one programmed a generic alpha-beta search and genetic algorithm (which I didn't have time to implement during the actual code war, but would have loved to try and use). Thanks again for a fun day!

First, my team and I had a great time, and I enjoyed both the competition and meeting people (I'm a new grad student so this was great).

Second, I've gotten our code posted (with a few comments about what we did and why):

Third, I believe that there are some areas that can be improved (David's post hits these pretty well, I believe):

1) The code war did not really allow for effective Java development.
- Java 1.2 was released in December of 1998, so it's not true to claim that it's the equivalent to using the latest .NET that VS 2010 supports. Java 1.2 doesn't include things that Java developers leverage to improve coding effectivness (auto boxing, generics, enums). Moreover, the Java supported by Visual Studio is a Microsoft variant: J#.

- The biggest limitation was in the tools available. Because we were forced to use Eclipse to edit (because the VS tools couldn't edit the .jsl files), VS 2005 to compile, and VS 2010 to build, our productivity was diminished by between 40% and 60%. I believe our algorithm would have been significantly better if we had been able to spend more time on it instead of spending time digging through non-issues related to the build and to the C# code. This was also due to the "Java" files being .jsl files, which can't be compiled by a Java compiler (only by the J# compiler).

- Moreover, never having used Visual Studio, we were unable to use advanced object reference techniques that are built into Eclipse to dig into code to figure out things like where the repair squares were. We discovered (and David confirmed) that Java and Python developers couldn't access the repair squares because of the C# to other language conversion of enums.

- I suggest that future code wars that need to run in a .NET environment provide an ant build file that creates a .dll file from Java.

2) The computer AI should probably not be provided. This may be an oversimplification, but it appears that the winning team basically increased the iteration count (by a few orders of magnitude) that the computer AI executed. Thus, we were really competing against the original AI, not eachother. Our team implemented entirely new logic. I believe we held our own against all teams except the winning one. I do not believe that what they did was cheating or unfair; however, in future competitions, it would be more fun if all teams were required to implement their on AI.

I had a great time with Code Wars. I've always wanted to do something like that. Thank you to all of the people (especially David Thielen and Professor Anderson) for organizing all of this.

Our team implemented three different strategies: aggressive, "least damage", and "flag-finding". The aggressive strategy would just use cards that had high priority. The "least damage" strategy would try to move in a way that would minimize the damage taken during a turn. The "flag-finding" algorithm is pretty self-explanatory. Each turn we would weight our choice based on our current health. In theory, it sounded like a good strategy, but in practice it didn't pan out as well as we had hoped.

Originally, our team started out using Python because we were all fairly familiar with it. However, it was just easier to use C# since the original code base was in C#. By using C#, code auto-complete came quite easily in Visual Studio. Overall, it worked out pretty well since C# is pretty straight-forward to pick up.

My biggest suggestion would be to run the simulated competition hundreds of times so that it would be more clear where each team placed.

Overall the Code War was a great experience. It was the first time I had participated in an event like that and I'm very glad I did it.

I thought that the game had too much randomness though. Programming an AI for it was very hard and ended up being more of a random move strategy anyways. I think more constraints would have made it more interesting.

The comments to this entry are closed.

David Thielen

B.I. Tweets

    follow me on Twitter

    Windward Reports


    • Quantcast