A study in ugly tessellations

Categories: Journal
Comments: Comments Off
Published on: August 22, 2020

A little more work on that map generator while dinner was cooking and now I have a hideous Voronoi tessellation of what was intended to be tectonic plates. I’m clearly going to have to rethink how I’m selecting the plate “centers” because I’m not getting the effect I want. Next up, Lloyd’s relaxation.


Categories: Journal
Tags: No Tags
Comments: Comments Off
Published on: August 22, 2020

So after a couple weeks of futzing around with voronoi tessellations, locating implementations, rewriting chunks of those implementations to fit my needs, not being happy with the results, ripping it all out and starting over etc I decided I’d stick with what I Know and use a radial hex map.

One cup of coffee, about an hour of coding (about half of which was sorting out an error in mapping Hex coordinates to Vector3s) and viola, one randomly colored hex grid (green tinted because, omg, random color selection is an aesthetic nightmare).

The mesh isn’t optimal but I’ll deal with that if it becomes a problem later.

Next up, plate tectonics and heightmaps.

It moved

Categories: Game Design, Unity3D
Comments: Comments Off
Published on: July 19, 2020

It’s been a long week so I only have the basic WASD controller set up with a proper state machine. Now I can run around the featureless checkerboard plain with a few amenities like

  • walking around a featureless checkerboard plain
  • autorunning around a featureless checkerboard plain
  • autowalking around a featureless checkerboard plain

I’ll add jumping on a featureless checkerboard plain a little later once I decide how to pass the collision detection to the state machine as well as a few other movement states:

  • free fall
  • sliding down slopes

No point in either of those yet since there’s no falling off or sliding down this which is good since the “player” has no rigidbody and only translates along the (x,z) plane. Baby steps.

Bare bones character controller for movement testing

Since running around a featureless plain isn’t particularly fun, it’s time to add some features to the environment. I could hand edit the Unity Terrain assets but since the goal is to go full Dwarf Fortress on the world generation (well maybe half-assed Dwarf Fortress) we’ll be starting with plate tectonics and building the terrain up starting with geologic time.

Back in the Saddle Again

Categories: Game Design, Unity3D
Comments: Comments Off
Published on: July 13, 2020

I spend a lot of time tinkering with various software projects, going at problems the wrong way, and generally making stupid decisions that a professional or more formally trained person would cringe to look at. Herein begins my cautionary tale as I learn painful lessons the hard way so you, dear reader, don’t have to. This is not a self promotion journal intended to demonstrate success or competency but rather the dev blog version of Ow, My Balls!

What’s Up First?

I’ve been fooling around with Unity3D for a while now so what’s the first project any burgeoning game developer should start with? That’s right, time to build my own MMORPG! I mean, a few orcs, a little hack and slash, how hard could it be?

In honor of my entrance to role playing games and as an homage to the first RPG sandbox I’ve ever played in I’ve named the project Hommlet and set up source control for it because I’m not a complete savage. I don’t really feel like mucking about with the network code or data storage model so in the spirit of Doing It Wrong, I’ll be starting with a basic character controller and will move forward from there based on the immortal words of Alex DeLarge

Thinking was for the gloopy ones and that the oomny ones use like inspiration and what Bog sends

So tonight I’ll raise a glass to old Bog and see what inspiration comes.

Precepts… Five, no eight, better make it sixteen

Categories: Buddhism
Tags: , ,
Comments: Comments Off
Published on: March 14, 2019

Coming away from the first class on the Bodhisattva Precepts at Buddha Eye Temple I have the following to roll around in my head for a while.

The Bodhisattva Precepts used in the Soto Zen tradition encompass and expand on the ethics / sila encompassed in the Noble Eightfold Path. The sixteen Bodhisattva Precepts include multiple precepts in three groups following the tradition of Buddhism as a list of lists. For the householder rather than the monastic, sila i.e. morality or virtue should be based on an inquiry into what advances oneself and others towards realization rather than simply an adherence to a set of rules. (more…)

Call me Sisyphus

Categories: Journal
Tags: No Tags
Comments: Comments Off
Published on: September 22, 2018

I don’t know why I continue to use Windows. Every single god damned thing feels like pushing a giant rock up a hill. I’ll admit that the fact that I’ve been doing most of my work on Linux for the past twenty years inclines me to use the linux idiom for getting things done and I’m likely just not thinking like a Windows user but my god does MSFT make doing things other than what they want to you to do in the way they want you to do it a massive pain in the ass.

I started using computers with nothing but a command prompt and while I appreciate some of the amenities of modern computing, I’d still like a marginally functional command prompt with a reasonable set of tools. I swear it takes me ten times as long to get basic work done in Windows than it does in Linux.

I think the only thing that is keeping me from just installing Ubuntu on my desktop is my recollection of how clunky desktop linux was a decade ago and my continuing vice of playing MMOs.

Also, I’m back from training people in what can only be described as a suburban Hellscape. How do you politely tell someone that you’d rather put a gun in your mouth than live in the same community they’ve chosen to make their home?

Cheating Irises

Categories: Journal, Machine Learning
Comments: Comments Off
Published on: August 28, 2018

HAL8999 7/100

I was sick yesterday but did spend some time looking over some “cheat sheets” that people had put together for various machine learning topics. Some were good, some were just stupid (I’m looking at you Machine Learning in Emoji). Also went through a very simply classifier based on the iris data set.

Model Selection

Microsoft Azure

Neural networks

Neural Network Graphs

Python 4 Big Data

Python 4 Data Science


Transformers, more than meets the eye

Categories: Journal, Machine Learning
Comments: Comments Off
Published on: August 26, 2018

HAL8999 6/100

  • Watched the “Learn how to Learn” Google talk on youtube
  • Updated the jupyter notebooks for handson-ml from github and read through the Ch2 notebook to address the CategoricalEncoder issue from yesterday
  • Looked at a basic transformer

Part of building a data pipeline is likely to include the creation of custom transformer classes to perform operations specific to the project or data source. For example, one of the products I work on stores xml data in a database with the newlines encoded as ‘\n’. When the data is pulled from the database those ‘\n’ sequences are converted to newline characters before the xml is passed to the parser. It’s a very simple operation but without it the data would fail xml validation.

The scikit-learn package provides a structure for building transformers for a data pipeline that is based on duck typing i.e. “looks like a duck, walks like a duck, etc” rather then through object inheritance. Essentially, if your class has fit(X) and transform(X) methods, it counts as a transformer.

from handson-ml import BrokeAsFuck

Categories: Journal, Machine Learning
Comments: Comments Off
Published on: August 25, 2018

HAL8999 – 5/100

Today while going back through the Hands On Machine Learning book Ch2 I learned that the CategoricalEncoder referenced in the section on handling categorical attributes still isn’t in scikit-learn. I checked the reqirements.txt which shows scikit-learn=0.19.1. Checking my virtualenv, I should be good.

Turns out that the CategoricalEncoder isn’t going to be in scikit-learn until 0.20 so to get it you have to grab 0.20 from Github rather than just use pip.

Fucking hell… 

So, if you’re going to write a book, it’s probably a good idea to use the stable branch of your libraries rather than the bleeding edge dev branch.

It will be a good exercise to convert the book’s example code to work with the standard OneHotEncoder but I’ve always been a fan of “just works” as a design principle.

Long days, no blog post

Categories: Journal, Machine Learning
Comments: Comments Off
Published on: August 23, 2018

HAL8999 – [3,4]/100

  • Chapter 2 of Hands on ML continues
  • Creation of test sets
  • Stratified sampling
  • sklearn’s StratifiedShuffleSplit
  • Visualizing data with matplotlib
  • Coorelation coefficients

Getting a good train-test split

Since you can’t train a model and just expect it to work well right out of the box it’s standard practice to split off about 20% of the data set to test the model against. The naieve way to do this is to just grab 20% of the data at random but that runs into a number of issues:

  • depending on how you do it, you may grab different train/test sets every time the model runs
  • grabbing data points at random can result in sampling bias to creep in if you happen to get an unrepresentative sample


Stratified sampling

Rather than just grabbing data points at random we can ensure that we can get a more representative distribution of sampled data points for some attributes (sex, income, ethnic background, etc) to ensure that random selection hasn’t introduced bias into the training and test sets.

In this example we can be pretty certain that median income correlates strongly with median housing price and we want to be certain we get a representative distribution of districts with respect to median income. The way to do this is to add a column to the data set that groups median income into categories and we can then sample based on the category. This will improve our chance of getting a more representative sampling of the underlying median income attribute.

Once the test set has been selected out we work entirely with the training set so as to not introduce bias based on knowledge of the test data.

«page 1 of 14
Welcome , today is Friday, April 16, 2021