Browse by Tags

All Tags » Algorithms (RSS)

A first stab at BaseN encoding with a focus on general alphabet encoding.

The comments in the code-only article are fairly decent, but I dislike being extremely verbose in my commenting because then I can't see my code. A little explanation of the problem is probably in order because of the lack of extremely verbose comments...
Posted by Justin Rogers | 43 comment(s)
Filed under:

Sometimes you just have to make something fun and silly. The chance tree converted to javascript...

Actually, I didn't make it to be fun or silly, but rather to create a neat little client-side application for a good friend of mine. Could have just as easily written a basic PRNG index swizzle and gotten identical results, but it seemed like this chance...
Posted by Justin Rogers | 18 comment(s)
Filed under:

Quick attempt at a validating roman numeral parser... Lots of gotchas.

Got asked about a roman numeral parser during an interview. I have to say that I don't mind when the process of obtaining employment plays into my strengths. The process was quite similar to a previous process where I wrote a spoken numerics converter...
Posted by Justin Rogers | 21 comment(s)
Filed under:

Generalizing the Poker Coder into a combinatorial series coder...

Two reasons for this really. First, I promised I'd do something with formalizing the code originated by Tim when I originally posed the problem. Second, a reader has had some issues downloading the original zip file. Since we have the opportunity we'll...
Posted by Justin Rogers | with no comments

I sure could use a million dollars, what about you? Transitioning from Riemann's to P vs NP...

Many of the greatest problems are solved by an unknown individual. With this single concept in mind I've worked off and on trying out my skills at the Riemann Hypothesis... Getting nowhere fast, if anywhere at all. Having an understanding of the problem...
Posted by Justin Rogers | 7 comment(s)
Filed under:

Architecting your own cache. Speed, efficiency, memory consumption, AND it has to actually work?

For the Project Distributor application we want to implement some caching. We have a number of options that we can use for this process, including making use of the default ASP .NET caching, but since I had some spare time I figured I'd throw 30 minutes...

Create random number filtering devices using the VectorChanceTree

If you are curious why we would need to filter random numbers that come out of a PRNG, then we should probably get you a full set of the Game Programming Gems series. The problem with a PRNG or even a full scale NSA class RNG is that random results aren...
Posted by Justin Rogers | 7 comment(s)
Filed under: ,

Creating a fixed impression ad rotation device from the VectorChanceTree

Time for some real world scenarios. I've mentioned quite a few, but the first one I'm going to implement is an ad rotation generator, even though, I haven't talked about ad rotation up to now as a possible use. Well, now I am, the VectorChanceTree happens...
Posted by Justin Rogers | 9 comment(s)
Filed under: ,

Upgrading a probability selection tree to a binary indexed array for dynamic probability changes

I'm focusing here on using C# as the primary language, so there are certain assertions I won't be able to make because of the way the language works. For instance, a binary indexed array is almost always faster in C/C++ than a tree structure, but in C#...
Posted by Justin Rogers | 2 comment(s)
Filed under: ,

Probability selection using a chance tree. Solutions for standard and loaded dice.

These current solutions are just for dice and loaded dice, but I need to get across the basic data structure in order to explain an enhancement we can make to allow our probability trees to be fully dynamic. I'll start by examining the process of dice...
Posted by Justin Rogers | 8 comment(s)
Filed under: ,
More Posts Next page »