/images/avatar.png

Yu-Kai "Steven" Wang

Is The Monty Hall Problem True?

You are presented with three doors, and there is a prize hidden behind only one of the doors. You chose door A, but before you can open the door, the host opens door B to show you that there is nothing behind it. Now you are given to chance to choose between sticking with your original plan (door A) or switching to door C. What should you do? It’s been a while since I last heard of The Monty Hall Problem until I came across Zack D.

Train an AI Agent to play Mountain Car with Reinforcement Learning

A few weeks ago I was chatting with a friend who is just getting into reinforcement learning. He asked me for some resources to help him learn better, so naturally I pointed him to the classic RL playground Gymnasium (formerly known as OpenAI Gym), which I had a lot of fun solving when I first started learning. This also reminded me of how rusty I am with the Reinforcement Learning techniques, so I thought about challenging myself to complete these puzzles once again.

Connect with Home Server Remotely via Tailscale

For the past few months, I’ve been building a home NAS for my family, mainly to store the terabytes of photos we have lying around in different hard drives all over the place. I’ve always wanted a place to store/backup all my university and work-related files too, and setting up this home server solved all my needs. However, while everything works fine when I’m under the same local network, it would be nice if I have access to my network drives when I’m outside at work, and even better when I can backup my photos while I’m on vacation somewhere else.

Get Structured Output with Function Calling from Google's Gemini

The other day I was working on generating a synthetic dataset using an LLM to evaluate another model that my company is currently developing. The workflow involves asking the LLM to read an article and extract some useful keywords from what it reads. I was using Google’s Gemini 1.0 Pro for the task and it understood the question fairly well, the only problem left is to find a way to format the model’s response in a structured way (like a JSON) for the response to be used later.

Smart Directory Navigation with PowerShell Script

Sometimes I find myself having to navigate between multiple projects. And since my main working laptop is on Windows, naturally I tried to customize my command line tool (I use PowerShell because WSL is just way too slow) to jump between directories faster. My folder organization looks something like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 home │ ├───Desktop │ │ file011.

How Sampling on a Spherical (Polar) Coordinate Can be Biased

Continuing from last week’s discussion on the volume of a hypersphere, we’re going to take a look at how to uniformly sample points on a 3D sphere (also applies to N-dimensional Hyperspheres), and the common pitfall that comes with it. Let’s say you are building an algorithm that spawns Pokemons at random locations all around the globe for the game Pokemon Go. The first thing you might do is to uniformly sample locations on Earth to spawn your Pokemons.