Skip to main content

Posts

The 9 Greatest Boardgames Discovered in 2022

 It’s the end of March and now the dust has settled enough to look back at my game-discoveries from 2022, and do a write up of my favourites…   Read more .
Recent posts

Top 50 Boardgames of All Time

Back in 2020 I decided to do a top 25 games as a countdown to Jul over on Instagram . That was a fun experiment. This year I’ve decided to revisit it in a more… scientific manner. Part I: 25-50 Part II: 16-24 Part III: 7-15 Part IV: 4-6 Part V: 2-3 Part VI: 1

Criss Cross AI

Some weeks ago, to end an evening of board gaming, I was introduced to the Knizia roll and write called Criss Cross (or Détrak here in France). A fascinating two dimensional dice placement game with very simple rules. As we left my friends place we discussed that it should be feasible to implement a simple AI for the game. So, when I got home, I started the process… Part 1 Part 2

Blog migrated!

  The blog has now moved to  https://blog.ervik.fr/ !

The 9 greatest boardgames discovered in 2021

This post has moved to my new blog:  https://blog.ervik.fr/2022-04-05-the-9-greatest-boardgames-discovered-in/

Benchmarking Dynamic Programming with Python

In this post I'll explore and benchmark some simple dynamic programming concepts in Python. The example I'll use is a classic recursive implementation of the fibonacci series . (And for simplicity I'll skip the first element in the series (fib(0)=0).) Naive approach  This implementation: ...works well (enough) for small numbers: but becomes impossibly slow quickly... ...since it has a time complexity of O(2 n ). (So our seemingly harmless fib(42) would result in more than 4 trillion calls to fib... (Or about 4 times the number of bacteria on the human body... Or 2 times the number of galaxies in the observable universe... Or more than the estimated population of fish in the ocean... Etc.)) Enter dynamic programming Since the result of these recursive calls to fib are all deterministic, we can cache the results instead of recalculating them. @functools.cache First a test by simply leveraging the cache in the library functools ... This speeds, as expected, the runtime up si

Metaballs Revisited

The new visual identity of my work place (and the re-ignition of an old lava lamp) made me think of the good old metaballs from the Amiga demo-scene of yonder and how it has been a while since I have implemented them from scratch. This time I wanted to play around with Python and numpy to see what that could bring. But first, what are metaballs?  It's, for example, this: Wikipedia defines them as: In computer graphics, metaballs are organic-looking n-dimensional isosurfaces, characterised by their ability to meld together when in close proximity to create single, contiguous objects. https://en.wikipedia.org/wiki/Metaballs As cool as multidimensional metaballs are, we'll stick to 2D ones in this post. The algorithm The algorithm behind them is quite straightforward -- in their simplest form. Basically for each pixel in each frame, or buffer, you add up the influence of each metaball in the simulation and then cut off below a certain threshold and normalize what’s left. The