They used a SAT solver, which inspired me to write a blog post about SAT solvers applied to sprint planning. If you guess unnecessarily, you always lose - but if you’re forced to guess then you’re guaranteed to be correct.Īs part of that, they had to use a Minesweeper solver to know when guessing was needed. While researching Minesweeper solvers, I came across Kaboom, a version of Minesweeper which forces you to play methodically. The main complaint was the number of people (and fire sprinklers) I hit with chocolate projectiles! Artifact 5: An article about SAT Solvers ![]() People enjoyed it (including the venue staff!) and I think they understood what I was going for. The military-industrial complex, of course! Introduce a theme and the audience participationīut what theme would I pick for a presentation about clearing minefields?.Humorous introduction without theme to set a light-hearted tone.I’d never seen a tech talk with heavy audience participation, so I relied on my experience with Improvised Comedy. With my game complete, I needed to think about how to do the actual talk. You can view the source code on GitHub or try a live version of the game on my website. I called it Minesweeper Constrained, and it served its purpose - though it wasn’t exactly efficient. ![]() It forced you to act like an algorithmic solver, manually combining and clearing constraints. I had a week’s notice before the talk, and thankfully had nothing else to do.Īfter spending every available moment working on it, I finished my version of Minesweeper with a few hours to spare. Since this talk was going to be even more in-depth, I decided to include audience participation to keep people engaged.Īdding audience participation just raised the bar - it’s one thing to understand a talk, but it’s another thing entirely to understand well enough to participate! I knew from my previous talk that the audience was getting a bit lost when things got complex. So, I was invited to give a long-form talk, in a 15 minute slot. If you’re not prepared to listen to me shout for 3 minutes, you can just read the slides on my website. One member of the audience enjoyed it so much that I was invited to give a longer version at the local meetup, NE:Tech. It paid off though - I finished perfectly on time, and the audience really enjoyed it. I spent 2 days straight preparing for this 3 minute talk, which I titled How to solve Minesweeper in 3 minutes. ![]() It didn’t help that everyone kept telling me that Lightning talks are the hardest kind of tech talk! It was my first real Tech Talk, and I was well outside my comfort zone. I knew exactly what I wanted to talk about, and jumped at the chance to indoctrinate the rest of the office! It was time for Scott Logic’s annual Christmas Lightning talks, and my Minesweeper obsession was in full swing. I thought that writing the solver would satisfy me and end my obsession - but it only made me want to do more… Artifact 2: A Lightning Talk I’m not particularly proud of it, so here’s someone’s dissertation on the topic instead. Looking back, this was inevitable given that Minesweeper is NP-Complete.Īll in all, the solver was good, and my constraint-based technique worked, but it wasn’t a great bit of programming. Making things worse, at one point I sat for 5 minutes assuming it had crashed, only for the solver to then report it had processed 5 million constraints! It never made a mistake, but occasionally it would get stuck in a situation that I could solve manually. I did finish my solver, and it worked - but it wasn’t flawless. If you want the details of how it all works, watch one of the talks later in this post or have a look at the Minesweeper Constrained readme. ![]() My solver defined Minesweeper as a set of constraints.Įach constraint declared This set of unknown cells contains between and mines. That meant a lot of downtime, and I just happened to have a laptop with IntelliJ. We were on our honeymoon at the time, travelling around Europe by train. Two months on, I can think of at least six side projects that are the direct result of my Minesweeper obsession. It all snowballed from there - implementing the solver was just the beginning. Most of the time, I don’t actually implement that algorithm. When playing a game, I often think about how I’d write an AI for it. It was a dark time - I even spent £3.99 for a Nintendo Switch version! In this post, I tell the story of my recent obsession with the game Minesweeper and discuss why having an obsession can be helpful.Ī few months ago, my wife and I were playing a lot of Minesweeper.
0 Comments
Leave a Reply. |