Dice Race (part 1)
More from Tom Moertel's Blog
By Tom Moertel Posted on August 23, 2024 Tags: sampling, sql, probability, poisson process, exponential distribution, statistics Sampling is one of the most powerful tools you can wield to extract meaning from large datasets. It lets you reduce a massive pile of data into a small yet representative dataset that’s fast and easy to use. If you...
By Tom Moertel Posted on December 14, 2013 Tags: assembly, 6809, games, hacks A long time ago, when I was a college undergrad, I spent some time working on computer video games. This was in the 8-bit PC era, when the gaming hardware was almost impossibly slow by today’s standards. It might not surprise you, then, to learn that game programmers...
By Tom Moertel Posted on June 12, 2013 Tags: programming, recursion, iteration, python, recursion-to-iteration series, tail calls, data structures, trampolines This is the fourth article in a series on converting recursive algorithms into iterative algorithms. If you haven’t read the earlier articles first, you may want to do so before...
By Tom Moertel Posted on June 3, 2013 Tags: programming, recursion, iteration, python, recursion-to-iteration series, tail calls, data structures This is the third article in a series on converting recursive algorithms into iterative algorithms. If any of what follows seems confusing, you may want to read the earlier articles first. This is an...
By Tom Moertel Posted on May 26, 2013 Tags: programming, python, iterators, streams, SICP, functional programming Recently while solving a programming puzzle in Python, I needed to merge a series of N iterators, each yielding values in sorted order, into a single iterator over the sorted values. The trick is that, when asked for a value from...