Sunday, June 29, 2014

ConQEST Presentations: Demystifying Electronics and Introduction to Soldering

On the 30th of June and 31st of July 2014 I'll be presenting at ConQEST. I'm running two different workshops:

  • Demystifying Electronics: where we will learn about the basics of electricity, common components, reading circuit diagrams, and common lab tools. We'll get hands-on experience constructing a oscillating circuit on protoboard and measuring its properties
  • Introduction to Soldering: where we will learn to solder and make a simple Infrared LED light for use with the wiimote whiteboard.
If you'd like to download the notes from either of these workshops they are available here:

Thursday, June 26, 2014

Tying your Shoes the Right Way

Apparently I've been tying my shoes wrong my whole life. Well, maybe not wrong, but certainty sub-optimally.

The problem was that I eschew double-knots because they're too difficult to undo while I found that the standard single-knot had a tendency to come undone in the middle of lessons. I felt trapped between a rock and a hard place trying to choose between interrupting the momentum of the class to tie my shoes or risking it until I have a moment to get the students working independently. I don't mean to overstate the issue but I really felt uneasy about leading a class with untied shoes.

The solution is the double-slip-knot; which is not a double-knot (and that is not a double-negative). It's the right middle ground between the security of the knot and the convenience of pulling to untie. My shoelaces used to come undone about once a day but they have yet to do so once since I've been tying the double-slip-knot.

All of the above links go to "Ian's Shoelace Site," a website dedicated to "Bringing you the fun, fashion & science of shoelaces." I couldn't agree more.

Saturday, June 14, 2014

Roaming Barbarians - Cities and Knights of Catan Variant

I love Settlers of Catan, and I especially love the Cities and Knights expansion. The statistics in the game appeal to me and I'm a sucker for anything that tessellates. However, I've gotten to the point where the game is starting to feel played-out; I feel like my friends and I have run through every permutation of outcome. To make the game a little crazier and more complex, we changed the rules for the barbarian invasion so that actual barbarian soldiers appear on the island, roam around, and sack cities.

I'll describe the rules then run you through an example. Finally, I'll discuss what the game feels like with these new rules.

Barbarian Tokens

  • The barbarians are no-longer a nebulous threat in a black ship, they are knights that roam the island just like your knights! Barbarian knights come in three levels, identical to your own knights. You will need lots tokens for level 1, 2, and 3 barbarian knights. You can use knights from a spare player kit, stacks of 1, 2, or 3 small coins, or any other token you can imagine.

Arrival of the Barbarians

  • Use the barbarian ship as normal to determine when the barbarians arrive
  • When the barbarians arrive, instead of resolving the invasion immediately by measuring the total strength of knights on the table versus the total number of cities, a certain number of barbarian knights arrive on the shore. 
    • The first time the barbarians arrive, two level 1 barbarian solders land on the shore. The second time, two level 2 barbarians land. The third time, two level 3 barbarians land. The fourth time, two level three barbarians and two level one barbarians land simultaneously. The pattern continues in this way.
    • Each barbarian lands in a bay on the opposite side of the island. Which bay is determined by the number on the red die. Starting from the bay in which the barbarian ship landed, count counter-clockwise as many times as the red die shows. One barbarian lands here, the other lands on the directly-opposite side. If more than two barbarians are arriving, place the strongest pair of barbarians first and then in descending order of strength place the pairs of barbarians in the next clockwise bays.
      • For example, the barbarians have arrived for the first time in the game below and the red die is '5'. Two level 1 barbarians show up in the bays marked '5'. If instead, four barbarians were arriving the strongest pair would go in the bays marked '5', and the weaker pair would arrive in the next clockwise bays which are marked '6' in this case.
    The red die shows '5' so both barbarians (red soldiers) land in the bays numbered '5'.
      • Place the barbarians facing inward - toward the center of the island. The direction they face is important for determining how they roam.
    This barbarian is facing inward toward the center of the island
      • If the barbarian ship arrives while barbarian knights are already on the board from a previous invasion, the existing barbarian knights are removed and the new invasion begins normally.
    Moving the Barbarians
    • On the turn that the barbarians land, they do not move further
    • At the start of the next player's turn, each barbarian moves one segment in, towards the center of the island
    On their first move, barbarians (red soldiers) always move one segment in, towards the center of the island
    • From now on, until they are killed (see combat), the red die determines where the barbarians go. The move is completed before the start of each turn before any resources are spent, trading is done, or robbers are moved. Rolling 1, 2, or 3 means that ALL barbarians turn left and move one segment. Rolling 4, 5, or 6 means that ALL barbarians turn right and move one segment.
      • Moving all barbarians the same way simultaneously ensures that barbarians never cross paths with each other. 
    The player rolled '5', so all barbarians (red soldiers) move one segment to their own right.

    Sacking and Defending Cities
    • If a barbarian arrives in an undefended city, it is sacked immediately reduced to a settlement!
      • If there are no settlement tokens available it is destroyed, wholly. Build your last settlement at your own risk!
    • If a barbarian arrives in an undefended settlement, nothing special happens. However, players cannot upgrade a settlement into city while it is occupied by barbarians. The new city would be immediately sacked and reduced to a city. 
    • Metropolises continue to be immune to barbarian invaders. If a barbarian arrives in a metropolis, nothing special happens.
    • Knights can now reside inside of cities, settlements, and metropolises.If a barbarian wanders into a defended city, combat occurs before the city can be sack. The city is only sacked if the barbarian wins combat (see next section on combat)
      • If a knight is in a city, settlement, or metropolis, they are considered to be occupied defending it and cannot be used to move the robber away from adjacent tiles.
    Combat - Destroying the Barbarians
    • Kill barbarian knights and remove them from the island with your own knights. Combat occurs when a barbarian and an active player knight cohabit the same intersection. The stronger of the two wins with ties going to the player's knight. Win or lose, player's knights are always deactivated after combat and are never killed. Barbarian knights are removed from the island if they lose. If a barbarian knight wins, he is reduced in strength by a number of levels equal to the level of player knight he defeated.
      • For example, a level two player knight can defeat a level one or level two barbarian knight, and can reduce a level three barbarian knight to level 1.
      • The player's knight must be active, otherwise no combat takes place. Both barbarian and knight continue to cohabit peacefully.
      • Normal game rules apply regarding using knights on the turn they are activated. Knights cannot move, fight, or defend on the turn they are activated, but can be re-activated after acting on the same turn.
        • Example 1: A barbarian and an inactive knight are cohabiting the same intersection. The player pays a wheat to activate his or her knight but no combat can take place this turn. Instead they continue to cohabit peacefully. On the next player's turn the barbarian moves on, but if another barbarian wandered into this now-active knight they would engage in combat.
        • Example 2: At the start of a player's turn, a barbarian wanders into a player's active knight and they engage in combat wherein the player's knight loses and becomes deactivated. That player may now activate his or her knight but combat does not continue; the knight cannot perform any further action and the knight and barbarian cohabit peacefully.
    • When a player's knight kills a barbarian, that player may immediately collect one progress card of their choice of any color. 
    • Once the last barbarian is killed (or removed from the island due to a new invasion), if one player has killed more than any other player he or she collects a Defender of Catan victory point.
    • Player's knights, when active, can perform one of four actions - all of which end in the knight becoming de-active according to the normal rules
      • Active knights can move any number of segments along friendly roads, but cannot jump gaps between non-connected roads and cannot move along unfriendly roads.
        • If the knight moves into a tile occupied by a barbarian, he also engages in combat. This move-and-attack is considered one action.
        • Two knights can never occupy the same intersection. You cannot team up on strong barbarians in this way.
      • Active knights that are not inside a city, settlement, or metropolis can be used to move the robber from an adjacent hex. Move the robber in the same way as if you had rolled a '7' and steal from one player who has a city, settlement, or metropolis on that hex in the normal way. No players have to discard cards.
      • Active knights automatically engage in combat with any barbarians that wander into them. 

    Example 1 - The barbarians arrive for the first time

    In this example, the barbarians are one step away from arriving on the island for the first time. The first time they arrive, two level 1 barbarians will land so each player has already prepared by buying and activating level 1 knights. White needs one knight for each city but yellow feels s/he can manage with a single knight because s/he has roads connecting both cities and can move his/her knight between them. Blue has built only one knight because the barbarians will not effect his/her settlements.
    The barbarians are almost here! Get ready!
    White rolled the barbarian ship so the barbarians reach the island. The red die shows '5', so both level 1 barbarians land in bay 5, counting counter-clockwise from the barbarian ship.
    Barbarians arrive at bay 5
    It's now Yellow's turn s/he rolled a 1 on the red die but it doesn't matter. All barbarians always move inward on their first move. The black barbarian ship also resets but doesn't move again because Yellow rolled the yellow castle.

    The barbarian on the right has invaded Yellow's city! S/He is well prepared, though. His/her level one knight engages the barbarian in combat before he has a chance to sack the city.
    All barbarians move inward in their first move, regardless of the result of the red die.
    Yellow's level 1 knight defeats the level 1 barbarian because ties go to player's knights. Yellow's knight becomes deactivated and the barbarian on the right is removed from the board. Yellow collects a progress card.

    The barbarian on the left was defeated and removed from the board
    With the threat on the right side dispatched, Yellow notices that there is a growing threat on the left! The remaining barbarian is still loose and there's a good chance he's going to wander into Yellow's undefended city! Yellow could build a second knight in his/her city but lacks the resources. Instead s/he will pay a wheat to re-active his/her knight and hope that s/he gets the chance to move him in time.

    Still Yellow's turn, s/he re-actives his/her knight
    It's now Blue's turn but s/he is not concerned with the remaining barbarian because barbarians have no effect on settlements. Blue rolls '5' on the red die and the barbarian moves to its right - into Blue's settlement. This would be an unwise time to upgrade that settlement into a city; it would be immediately sacked and reduced to a settlement.

    Blue's settlement is not effected 
    White rolls '2' on the red die so the barbarian moves to its left.
    The barbarian moves to its left
    It's Yellow's turn and s/he rolls '1' on the red die so the barbarian again turns left. Now Yellow's undefended city is in serious danger.
    Yellow's city is in danger!
    Still Yellow's turn. Yellow move-and-attacks the remaining barbarian and kills it. Yellow collects a progress card. The last barbarian has been killed and the invasion is over. Yellow killed more barbarians than any other player and thus collects a Defender of Catan victory point.
    Yellow's knight moves to kills the last barbarian

    Example 2 - Stronger Barbarians Invade

    The game has now progressed. The barbarians have arrived twice already and are about to arrive for the third time with two level 3 barbarian knights. In this example, none of the players have built any level three knights; perhaps they haven't reached the third level in the blue development tree?

    Each player has level 2 knights leftover from the last invasion but these knights will lose combat to the barbarians that are on the way. The exception is White's level 1 knight at the South end of the island. White doesn't need to defend this metropolis because barbarians have no effect on metropolises. White has decided not to upgrade this knight and is instead using it deter players from placing the robber in his/her territory.

    The quiet before the storm
    Yellow rolls and the barbarians arrive. The red die shows '5' so they arrive in bay 5 again. Yellow is in serious trouble. Next turn the barbarian on the right will move into his city, defeat his knight, and reduce his city to a settlement. Blue is also in a lot of danger from the barbarian on the right.

    Yellow is unable to build anything to help him/herself and passes on to the next player.
    Level 3 Barbarians arrive (coincidentally) on bay '5' again
    Next, Blue rolls. The value of the red die is irrelevant because barbarians always move inward on their first move. Yellow's level 2 knight is defeated by the level 3 barbarian. The knight is deactivated, the barbarian is reduced in strength from 3 to 1, and the city is sacked and reduced to a settlement.

    Meanwhile, Blue is facing the same fate on the left side.

    Yellow fails to defend his/her city. It is reduced to a settlement.
    It's still Blue's turn, however. Blue builds a road to the barbarian so that he can reach it with his knights. He move-and-attacks with his level 2 knight. The knight is defeated and deactivated but the barbarian is reduced in strength from 3 to 1. Blue then builds and activates a level 1 knight in his city. He can't attack with this knight but if the barbarian were to wander into his city it would be defeated. Blue's city is safe!

    White and Yellow have cities that are still in danger if the barbarian moves left though...

    Creative thinking has saved Blue's city!

    So, What's it Like?

    My friends and I have played this variant in a three-player game. The Good:
    • Not knowing where the barbarians are going to go adds a huge layer of suspense. 
    • The threat of the Deserter card is hair-raising. 
    • The level three barbarians can wreak havoc if you can't build level three knights. 
    • If you get to the point where four barbarians are landing at once it's total chaos and huge fun!
    • The importance of the blue progress track is raised. In our previous games it was universally the least favored so this is a good shift for us.
    The Bad:
    • This variant can be pretty brutal. Probably not for beginners or players overly concerned with fairness
    • In the original rules, players have to cooperate to defend the island but in this variant there is not so much they can do to work together against the barbarians if they want to. I feel like this is antithetical to the original game. I'm interested in any suggestions on this issue. 
      • Maybe opponent's knights can move along unfriendly roads and enter unfriendly cities by invitation? The host gains the protection of the guest knight while the guest gets the credit for any kills.
    The Ugly:
    • You have to build your own knights. Relying on others to defend the island is not a good idea.
    • Connecting all your cities together is hugely beneficial. You may want to choose your initial placements to favor connectivity over the best resources.
    Let me know what you think!

    Thursday, June 12, 2014

    O'Neill Cylinder Simulator - Projectile Motion in Spinning Space Stations

    Last week a student was talking with me about what life would be like on a spinning space station. In the absence of a gravitational field, we can simulate a gravitational force with the centripetal force from the rotation of the space station. Famous examples of this principle include O'Neill Cylinders and the ring-world in Halo

    Artists Rendering of the Inside of an O'Neill Cylinder Space Colony from NASA
    The Halo Ring-World
    In our discussion we came across the thought of what it might look like to throw a ball in the air in a zero-gravity rotating space station. I was stumped so I brought the question to my colleagues. They were stumped. Eventually I was able to make a pair of parametric equations for position in time to model the motion of the ball but it didn't tell me much unless I could visualize the graph of the equations. The next logical step was to simulate the equations in software. Enter the O'Neill Cylinder Simulator:

    Passing a Ball to Yourself in an O'Neill Cylinder
    When I saw the parametric equation animated (like above) it blew my mind a little. Here we see someone throwing a ball up and to the left, it circles above their head, and returns to them from the right. Throwing a ball in an O'Neill Cylinder apparently is nothing like on Earth. You can do some really sweet patterns:

    A ball thrown through the center of the ring with a low velocity compared to the tangential velocity of the ring will spiral!
    Basically projectile motion is nothing like that on Earth. When Master Chief throws a grenade on Halo he might be in danger of it looping over his head and landing at his feet!

    If you're curious, these are the parametric equations used to plot the position of the ball in both frames of reference

    If you want the source code, you can grab it here. Apologies in advance for the poor quality of code.