11 10 / 2012
I’m taking a class on programming for embedded systems, and our most recent assignment was to build and program a tic-tac-toe board with an Arduino. My finished project is above: nine lights which can be lit either green or orange independently (though they’re wired on a grid system, so I have to flash through them to light more than one at a time), and two buttons (one to choose a move and one to play it).
As you can see, it’s fully capable of setting itself up to win and blocking the user’s attempts (the computer player is orange). In fact, I’m pretty sure the AI is unbeatable; beyond more basic play, it defends against the user’s attempts to set up a win in two directions at the same time, and it can even attempts these setups itself.
Though I won’t post the Arduino source for the program (it’s a school project, so collaboration policies, etc.), I have posted a Python version of my AI on GitHub, including a more detailed description of the AI design. If you’re interested in this sort of thing, you should check it out.
06 10 / 2012
Random Descriptions and a Nonsense Server
You, too, can similarly use nonsense wherever you like: just access http://mattnichols.net:5000, with the optional GET variables url, lines, and words. These default to 5 lines of approximately 7 words each, drawn from the text of T. S. Eliot’s The Wasteland. Should you wish, you can also check out the updated Nonsense Generator source on GitHub.
12 9 / 2012
Conversations with math majors, pt. 1
- If you ever get a dog, you should name it Woofram.
- I heard that Woofram is kind of an alpha male.