Stochastic Optimal Control

Here I have some notes introducing some key concepts in Stochastic Optimal Control. Stochastic Optimal Control is a branch of Control Theory that seeks to define strategies for controlling systems with some random input or randomness in the output. It also defines strategies that use randomness as a method for discovery, an example being Monte Carlo Methods.

I briefly introduce some applications in robotic control and financial engineering, but the applications are much wider and varied than those two examples. These notes will be updated as I learn more.


I’ve been missing for a while. The work from school and research has just been ridiculous this semester and time management is a developing art for me.

Since I’ve been gone we’ve had some interesting developments in our technological lives. From rumors of trade wars, the uncovering of foreign nefarious activities, to shady use of data by politically bent computing firms via social media.

This last point is particularly important in that it hearkens to the aim of this blog. That aim being to take control of our technological lives, getting involved the “The Game” of computing, data science, and AI.

Technological Determinism.

I direct your attention to Data for Black Lives:

Who Owns the Future?

As I have prepared for finals, I took time during my study breaks to finish the book Who Owns the Future by Jaron Lanier. The news cycle relating to economics and politics can be very distracting (addicting) at times. During these times it is necessary for me to get a fresh take on things, especially if it allows me to see a bigger picture. This book does an amazing job of painting a picture of the economic and political landscape of the early 21st century. The issues Lanier raises illuminate some of the seemingly unconnected problems I have been trying to parse. He very adeptly draws the link between the Obamacare debates, and broader issues of the cost of healthcare, the ridiculousness that was the 2016 presidential election cycle, and the apparent shrinking of the middle class. In Jaron’s eyes these problems orbit around the major advances in computing and artificial intelligence.

The paperback version of this book was published in 2014 with some additions to the original version. He scarily predicts our political future as well as theorizing rationally about our present and recent past economic situation. All of this is based on his deep understanding of technological trends relating to Big Data analytics and Artificial Intelligence. As a technologist and futurist, Lanier skillfully exposes problems associated with these technological trends without detracting from their positive impact. Later in the book he theorizes about how to minimize these negative outcomes so that the positive effects of the advancement of technology can be maximized. The solutions he proposes are by no means exhaustive and I’d like to explore and expound on what better solutions may look like.

I encourage everyone to read the book, but below I’ve posted a (short) video of Jaron summarizing his thoughts. He’s an eccentric dude, but his ideas touch on some very important issues.

Joker Joker Deuce Deuce

Joker Joker Deuce Deuce seems like the de facto style of play for the younger generation of spades players. It’s played late at night in the college dorm rooms by folks with 8am classes. It’s played in off-campus apartments accompanied by Four lokos, Amsterdam, and other low cost spirits that may or may not come in a plastic bottle. And of course it’s played at BBQs, cookouts, and other family gatherings.

In this version of spades, the deuce of hearts and deuce of clubs are removed from the deck in favor of the two Jokers (big Joker and little Joker). The addition of the two Jokers and the use of the deuce of diamonds as a spade changes the number of cards from each suit in play from 13 to the numbers below:

• Spades : 16
• Hearts: 12
• Clubs: 12
• Diamonds: 12

Intuitively, more spades in the deck (4/13 compared to 1/4) means you have a higher chance of ending up with one or more. On average, in JJDD each player will have four spades and three of each of the other suits.

Okay, before you tell me about how you always end up with six hearts (that sucks btw) we all know that spades doesn’t go by averages. It goes by the heart of cards. Like other versions of spades, there are going to be hands when you have the juice, other hands where you’re struggling to get two, and once in a while you’ll still end up having a hand with no spades.

So what really IS the difference besides a few extra spades? Besides changing the initial probabilities, using one less cards per suit increases the likelihood of an early cut (compared to the Ace down version of spades). The first time that Heart, Diamonds, or Club is played, the highest card played (usually the Ace) will walk. Please pray for that King though – one of them is probably not going to make it.

Saving the hypergeometric probabilities talk for later, let’s go over some rough probabilities. Each book has 4 suits of a card played. After the first book, there are 8 cards of that suit left in play split among 4 players. How many cards of that suit do you have left in your hand?

If every player has at least 1 more card of that suit (84% chance), then the King is safe. So probability-wise, you should still count your King as a book unless you have four or more cards of that suit left in your hand.

BTW, I’m saying the King because it’s usually the second card in the suit played but that is not necessarily the case.

However, if one player received 1 card of that suit (about a 13% chance) then that King will be cut (unless that player who can cut is your partner – don’t you love when that happens?). With 13 cards per suit, there’s only a 8% chance that a player has 1 card of a suit. If you’re thinking 8% compared to 13% isn’t THAT big of a difference then…you can’t be on my team.


Spades is all about probability

Imagine you’re playing spades. You’re down to three books (or “tricks” as the old folks say). You’re in a tough position because your team need to win two of the remaining books or y’all will be set. On top of that, you’ve been talking shit all game.

Right now your partner has the highest card on the table but you’re not sure if she’s gonna win the book. Do you cut or play over your partner to give your team the better chance of winning the book? Or do you play under with the hope that your partner’s card will hold? If you play spades regularly you’ve no doubt run into this situation. And this is not a trivial decision – the book, the hand, your reputation, and hell, even your relationship with your partner is at stake (and I promise I’m not being dramatic).

So what did you do?

Now there’s no hard and fast rule about the best move in this circumstance. Some folks say “play to win,” but if you play over your partner’s strongest card then you may cost your team a book (and the game). Alternatively, some folks believe you should NEVER play over your partner but this strategy can be problematic as well.

Now back to the question. What did you do?

I’m guessing what you ultimately decided depended on number of factors. What cards have been played?* What cards are left in your hand? What’s the probability that you can win the remaining books with those cards? What cards do you think your partner has left? What cards do your opponents have left? How many sandbags do we have?

If you were confident that you could win the last two books  you might have been more willing to play under. If y’all really needed that book and you thought you could win it, you might have been more willing to play over your partner.

So in short, what you did (whether you knew it or not) involved calculating the probabilities of winning the hand based on the competing strategies.

Like poker, spades is a game that involves the implicit calculation of probabilities. When you think “will that card walk? what’s the chance that this card is going to be cut? who’s cutting? or who has the Joker or Ace of Spades?,” you’re calculating probabilities. Probabilities describe the chance of an event occurring (usually given as a ratio or percentage).

Astute spades players intuitively recognize the probability of a specific card walking can be much different if the card is the first one played versus if it’s the third card played. The chance of a card being cut generally increases as more cards of that suit are played. Identifying who is cutting is more difficult and requires you to watch who is playing what. And if you don’t have the highest card there’s a 1/3rd chance your partner has it and a 2/3rd chance that one of your opponents has it.

Okay so spades involves probabilities. So what?

As you are playing spades you are (or should be) constantly calculating and re-calculating probabilities. I’m not talking hardcore conditional probabilities but rough calculations that you can help you choose the best option. In the forthcoming posts I’ll discuss how you can use knowledge of probabilities to help make you a better spades player.

* If you haven’t kept track please re-evaluate your life as a spades player.

Spades is all about probability



I don’t really know how to introduce the blog. I’m a crappy writer. I suppose mainly I just wanted to have a place on the web that serves as a repository of ideas and content related to afrofuturism and dope ish.

I’m a physics grad student and founder of a nascent engineering and design firm. I hope to add to the discussion of afrofuturism with an emphasis on technology, design, directed action, and our current state of affairs.

I’ll dive into some math, physics, software development, and engineering to hopefully foster some ideas and projects.


This blog is focusing on an understanding of the future from us folks who are still trying to make our way in the world. With that in mind I believe it’s important to have a sense of the practical. The amazing thing about our time right now, is that practical does not equal less amazing.  This, while not being 100% what I’m talking about, at least puts things in the ballpark.

The Mundane Afrofuturist Manifesto is primarily a philosophical exercise (something I suck at). Many of the materials I’ve found dealing with afrofuturism center around ideas and perspectives. This is where I’d like us (those who contribute to this blog) to differentiate ourselves. No doubt ideas, perspectives, and whatever will be discussed here. This blog would not exist without some sort of discussion of perspectives and ideas. The main thrust, though, is the development of technology to achieve well defined goals and to solve problems (something I suck less at). As a starting point:

  • Computer and information technology has been one of the greatest shapers of society in our time, and it doesn’t seem to be slowing down.
  • In this globalized world, individual achievement and group self determination is not the same as it was in our parents days and probably won’t be ever again.
  • Technology is becoming more accessible but more complicated to understand on a fundamental level.


These can be good and bad depending on your personal experiences and preferences.

I see opportunity here (out of necessity), but my views are singular, and narrow and I move towards solutions as I see problems.

I will be posting links to projects and whatnot.

Stay tuned.