Mastery Cohort
8th Light Apprenticeship - Day 54
Today Micah Martin held a cohort with the London office. It was a code spar, so in teams each group had to solve the same problem, and collect points. The team with the highest score won.
We had to write code that move ants around a screen. The ants look for food. When they find food they must take it back to the nest, and a point is scored. You may use up a point to spawn a new ant.
The first thing to do in code sparring is connect to a server. Using java, this is very verbose so I paired with Danny in Closure. Whilst I was not familiar with the language I kept very engaged and followed all the logic that we were doing as I wanted to contribute.
We played fair and set our ants out looking for food. As it turned out, for the first two rounds, we were allowed to hard code the food location, so we switched our attention to travelling to the food in the most direct manner, then back to the nest. This worked well. We decided that ants in the first three generations could spawn, to increase our army size.
During the last round, the location of the food was unknown upfront, and the location would change every minute. This meant we had to reintroduce the searching. At the start of the day we were trying to search smartly, but by the end we felt, with the food locations changing every minute we would just do a random walk, but put different weightings on the directions depending on which quadrant of the grid the ant was in.
In conclusion, the cohort was a lot of fun. People definitely love a competition and code sparring gets a lot of enthusiasm going. I would have liked to contribute to the coding a lot more, so I am looking forward to learning more languages so at the next competition I can get more hands on. In fact, once I’ve learnt ruby or closure I’d love to do the exercise again. Perhaps I’ll spend a waza session doing just this.