Archive for the ‘Otaku’ Category

In The Cards

Sunday, March 6th, 2016

Go and get a deck of cards, shuffle it, and deal it out in the order you shuffled it. You may find this hard to believe, but it’s extraordinarily likely that no one ever has shuffled cards into the same order you just did.

random cards

You’ve probably heard this before, since it’s one of those quite interesting facts that does the rounds. But in case you haven’t, the reason is that the amount of different ways a 52 card deck can be ordered is astonishingly high. The number is so big it’s difficult to parse:

8065817517094387857166063685640376
6975289505440883277824000000000000

Yes that’s one number written across two lines. To get an idea how large this is, it’s significantly higher than the number of stars in the universe, the number of atoms in your body, and the number of seconds that have elapsed since the universe was created in the big bang.

I’ll take it one step further. Depending on who you ask, between 60 and 108 billion humans have ever lived, so we can use an average of 80 billion. Applying the Doomsday Argument to this average suggests that about 1.2 trillion humans will ever live (and there’s a blog post on that topic itself!).

So in the entirety of human history, if every human ever lived to an average of 70 years and spent every single second of their lives shuffling cards the entire output of humanity would only correspond to a miniature subset of the total possible permutations of a 52 card deck (3.3E-45% to be accurate).

So shuffle that deck, deal it out, and be impressed with a creation that only you have made.

intellivision

This has an interesting relevance in the field of gambling, which requires randomized deals lest the player guess the card order. Using human dealers, decks can be shuffled in a way that makes them almost completely random (although studies have shown that a virgin deck must be shuffled anywhere from 4 to 7 times to eliminate the order inherent in the way it was packaged). But these days the vast majority of deck shuffling is done by computers, and it’s not trivial to make computers do things truly randomly.

The very first computer games that included card shuffling had extremely primitive random number generation and could only return limited unique decks. Random number generators require a ‘seed’ (ie. a start value upon which all others are based) and every sequence based on the same seed is identical. Games on the Atari 2600 and Intellivision (shown above) typically used hardware values or player input (such as the number of frame refreshes that occurred before the player pushed the start button) as seeds, but even then were limited to usually only a couple of hundred unique decks. Given enough time and effort therefore, you could know the entire order of cards based upon the first few dealt.

As time moved on the algorithms became more sophisticated, and so too did the random number generators, but even then it was possible to predict deck orders if you had enough information. In 1999 an online casino, in an attempt to demonstrate their games were not rigged, actually posted their RNG code online. Someone got it, worked out how they seeded (based on the clock time, as I did in my polycap simulation), and actually wrote their own code that was able to reproduce perfectly the shuffling of the games they were playing online.

So we get to today, where RNG’s use very creative ideas to seed themselves with truly random seeds (such as using code to convert video frames captured from random Youtube videos or 1 second of white noise from a radio into seeds). But there is still a problem in that the range of randomly generated numbers is still limited to about 4E38. In short, you can’t generate a number between 1 and 8.06E67, which means you cannot generate one number for each possible deck permutation.

There are ways around this (hint: using only a single coin you can generate two random values) but it makes the task of writing a deck shuffling simulator that can account for every possibly permutation non trivial.

I think.

vp

So as a result of this thought experiment, Bernard’s going to do it! Here’s my design document:

1) Assign all 52 cards a random number
2) Sort them
3) Output shuffled deck

It’s trivial stuff, and should only take him a femtosecond or two to implement. But the true fun is in the testing! For what I’m really interested in is how many unique shuffles are completed before a repeat occurs. Therefore the output (deck order) will need to be saved as well as the time it takes for each shuffle to be completed. Plus, since 52! is insanely large (the world will end before his computer shuffles that many times) I’d say saving the first 15 cards + the time the shuffle occurred is sufficient to do some statistical analysis.

So there you go Bernard, there’s your challenge. Write the code, run it 1.3 trillion times*/**, save the first 15 cards in each deck and the time the shuffle was performed and then analyze it to see if any sequence repeated.

Let us know the results ๐Ÿ™‚

* I’ll assume you have a modern Pentium running about 100k MIPS, and that this code requires maybe 1000 operations to execute (a big guess there; the sort could take many more), which means about 12000 seconds or 3.5 hours per experiment. However writing results will slow it down a lot I suspect. Good luck!

** A very rough mental calculation tells me this may be a file size in the orderย  or 17Tb. I hope you have a lot of space! Even more luck to you sir!!

2015 in Games

Tuesday, March 1st, 2016

Well it’s a bit late in coming (blame Australia and the blogtastrophe), but it’s time once again for my annual summary of game playing and purchasing!

The numbers were up this past year, with the game-playing drought of early 2014 a mere memory now. Also last year was our first year with the PS4, but as it turns out it wasn’t the system that captured most of my time. In total during 2015 I purchased (or obtained as gifts) 69 games for a total cost of $2006.27, or an average of just over $29 per game. The numbers were up on 2015 by about 50%, but the average cost of games actually decreased. In addition during the year I purchased two new 3DS systems (a ‘new 3DS XL’ for me, and a 3DS for KLS).

As a percentage of total purchases, here’s the chart:

Screen Shot 2016-03-01 at 8.06.04 AM

And as percentage of total dollars spent:

Screen Shot 2016-03-01 at 8.06.12 AM

That latter chart includes the cost of the two 3DS systems, which is why the 3DS portion is so large.

The most notable element of this data is the abundance of PS Vita, both in terms of games (32) and dollars (almost $800). This system, which was by many accounts DOA even when I purchased it last year, has become a bastion of imported Japanese RPGs, and while many of the games aren’t stellar quite a few of them are very good and I’ve been having a blast buying – and playing – all of them. Very quickly my Vita library has become quite large, and I’ve still got over a dozen unopened games on my shelf (and more arriving every month) that will give this system legs for a long time.

The other notable is the Wii U. Not much to say there, except that the system is not so much dying slowly as has never lived in the first place.

As usual, I’ll comment on my favourites in a moment. But first, four particular games warrant mention…

The first is Animal Crossing Happy Home Designer for 3DS. This is a charming ‘game’, with beautiful presentation and a massive – massive – amount of content which was tragically marred by some very poor design decisions. Essentially the game is about interior decoration, where you design and furnish houses for the other animals in the game. But the designers chose to omit such obvious things as budgets or rating systems or any sort of currency or systems that promoted gradual improvement. At best it became a toolbox where you just designed homes for the sake of it, and became stale very quickly. A very missed opportunity, and a great disappointment.

The second is Super Mario Maker for Wii U. It’s a wonderfully designed product, and I love making courses… but I don’t have anyone to play them and strangely I don’t particularly enjoy playing the (often terrible) courses designed by random strangers. That said Nintendo has done a wonderful job evolving the product since release, including adding content in the form of special downloadable courses, and I suspect I will periodically return to this one to see what’s new.

The third is Witcher III (PS4), a titanic game with mind-boggling graphics that looks insanely fun and would certainly have made the list below had I played it. But I didn’t, because it’s KLS’s game ๐Ÿ™‚

The last (and you can sigh here) is the eternal Puzzle & Dragonsย (iOS). Yes I’m still playing it (spoiler alert: last Saturday was my 1000th consecutive login) and yes I still love it. The game has evolved so much over the years, and has become so generous that I haven’t actually spent any money on it for going on 18 months now. I’ll likely play until the servers close years from now ๐Ÿ™‚

As for my favourites, well it was a year of great games, so I’m going to upgrade from three to five. Here they are in reverse order:

Terraria

5) Terraria (PS4)

I got into this pixel-art 2D ‘build-em-up’ early in the year and love, love, loved it. The PS4 version cost me an absurd $4.98 in a sale and I must have easily gotten 100 hours out of it. I built a massive castly, dug a shaft all the way to hell and even had my own mushroom farm. I made so much amazing gear, killed every boss and did and saw everything in the game. Highly recommended.

axiom-verge-screenshot-08-ps4-us-13jun13

4) Axiom Verge (PS4)

The work of a single guy, this 2D Metroid clone was the game I was waiting for and never knew existed. Again, it dominated my time around Thanksgiving and I loved every last second of it. For an inexpensive downloadable game, this one is a no-brainer.

maxresdefault

3) Diablo 3 (PS4)

The PC version was good, the PS3 version better, but the PS4 version is just superb. I played more of this on PS4 than any other game this past year, pushing my Wizard and Barbarian characters (that had been imported over from PS3) to new levels of insane power. The game very recently updated with a brand new patch, so I’ll be returning to this one soon. Or maybe not, since who know’s how long this next game will last…

xenoblade-chronicles-x-8

2) Xenoblade Chronicles X (Wii U)

When Xenoblade came out for Wii a few years ago it blew away those who played it. Which weren’t many, since it was released here in limited amounts. But it was a masterpiece of a game full of charm and innovation that I remember very fondly. This is the sequel for Wii U, and it’s even better. I’m currently playing it, 80 hours in, and I feel I have only scratched the surface. It’s basically a single player MMO with all the systems you expect from the genre, set in a truly massive world with some of the very best graphics I have ever seen (on the Wii U!?!?!). It’s easily one of the best RPGs I’ve ever played and I don’t think it will ever be surpassed on the Wii U. A monumental achievement in game design. And yet, despite all this praise, not my game of the year…

MH4U-Apex_Seregios_Screenshot_001

1) Monster Hunter 4 Ultimate (3DS)

You knew it was coming didn’t you? When this game came out my savefile passed 100 hours in the first 10 days. Think about that. I played like a man possessed, but as much as I accomplished there was always more. This is easily the best MH game yet, and the addition of online play directly from the 3DS (a first for the series) took the gameplay to an entirely new level. I ended up putting the game aside after about 250 hours of play, but returned to it after my Oz trip and have amassed another 60-odd hours since then. SFL and I have been hunting regularly every week and it just keeps getting better. At this rate it won’t just be the game of 2015, it’ll be the game of 2016 as well ๐Ÿ™‚

Crafting +3

Monday, February 29th, 2016

It’s time again for a craft upgrade. I’ve made a few things since Christmas, and some will wait for their own post, but here’s a few of the others. 

 
That’s all the parts for Gundam G (Self Perfect Pack) which is a 1/144 scale, not particularly expensive (<$20) kit. It’s a not particularly attractive version of the basic Gundam design that I bought because it has a gimmick. See this photo: 

 
Yes, it (intentionally) glows under UV light! Sure it’s garish and unsightly, but at least it glows!

Jokes aside this was a quick and easy build with the typical high quality Bandai brings to all Gundams. While it doesn’t require glue, I put a few drops in a couple of places to make it more secure. For the price, this is a good kit.

The next item was this: 

 
It’s a 3D sculpture made of cardboard! KLS got me this for Christmas and although it was very quick to assemble I was impressed with the precision and how nifty it looks complete. Here it is hanging in our kitchen (it’s about 2 feet tall): 

 
Lastly, another model kit: 

 
Yes, another Zoid, namely Cannon Tortoise. As with the others I have purchased, this was expensive, complicated to assemble, and very impressive once complete: 

 
It’s not much bigger than my palm, has articulated feet, a rotating (and rising/lowering) cannon, and a head/cockpit that can retract into the shell. 

It isn’t a kit for beginners, and it’s a little drab unpainted, but I greatly enjoyed making it and suspect it won’t be my last Zoid!

Out Hunting Again…

Thursday, January 21st, 2016

Monster Hunter 4U came out for 3DS almost a year ago. Of course I played it. I played it like a man possessed. I swung my hammer for about 250 hours in total, rising all the way to G* gold crown rank (the highest). It was probably the most fun I had ever had in a game ๐Ÿ™‚

Then I put it aside and moved on to other things. I never forgot it though, because as much as I had done in the game, there was always more. There is always more, both to see that can ever be seen and to do that can ever be done. So recently, as SFL has gotten into the game in a big way, I started thinking about it again. Was it time to return?

These thoughts often occupied me in Australia. I wished I had brought the game with me to play it during downtime. As SFL regaled me with her tales of success I wanted to smash monsters too. I even bought the game for AW, so we may possibly be able to play online together.

Once I returned home, it didn’t take long for the cartridge to once again be put into my 3DS. It had been over six months: did I even remember how to play? And if I did, was I still good? Since I’m in the awful world of ‘always tired but never able to sleep’ jetlag, I’ve had a lot of extra time these past few days. And I’ve been hunting.

db

My first decision: master another weapon. Hammers are wonderful, but occasional frustrating to use online. Besides, I’d mastered them! Naturally my first choice was dual blades, always my distant second to the hammer as a preference. I had made a few back in the day, but never the ultimate versions (rank 10 weapons). I had my eye on one of them, but it required farming this guy:

rb

That’s ‘raging Brachydios’, an always angry walking explosion that excels at killing players online. A year ago farming him was like pulling teeth since many players were simply not good enough to survive. These days things have changed, and online is mostly populated with the diehards still playing a year after release. The average skill level is much higher; monsters that were once borderline impossible are now just scary. I took the time to kill a few of these guys before he dropped his ‘Immortal Reactor’ part needed to make a fantastic weapon, the first part of my plan.

But what good is a weapon without armor skills? My set is perfect for hammers, and on top of that is fully upgraded using rare materials farmed from guild quests. It’s tempting to keep using it with my blades, but there are more appropriate sets for a blade wielder. So I will make them, which means more farming. The ‘Ferocious Rajang’ are bad enough (although a cakewalk compared to the godlike ‘Apex Rajang’, which routinely wipes multiplayer quests inside a minute) but I’ve almost gotten the parts I need so far. Now I have to move on to this guy:

kirin-charge

‘Oroshi Kirin’, an ice-bases subspecies. It’s difficult to be sure, but even worse seems very reluctant to drop the parts I need. I reckon this will take time…

And I haven’t even given much thought yet to the other guys I need to farm, like a ‘rusted Kushala’ (shudder) and epic boss monster variant ‘Shah Dalamadur’ (weep).

But I’ll get it done, because this game is a fierce addiction. Sure I can kill them all already with my hammer (and have), but I want to do it with DB as well.

And then when the armour set is made and the weapon honed then comes the charm farming to make the skills the very best. Even beyond that one could spend countless hours farming guild quests for the super rare relic weapons. Once guild card I’ve obtained from a player online shows his save file to be an astonishing 1035 hours, and he is only HR 729. I’ve already played with a few rank HR999 guys!

And when that’s all done, and I have the best dual blades and accompanying armor, maybe then I could move on to another weapon.ย  After all there’s fourteen to choose from ๐Ÿ™‚

Pong

Friday, November 27th, 2015

For my next electronics kit challenge, I made this:

IMG_2890

Yes, a TV Pong kit, in component form. It was cheap (about ~$10) and looked easy to assemble. Could it be any good?

Here it is ready to be put together:

IMG_2891

Not a bad amount of pieces. The PCB is very clean and easy to solder onto, and compared to some other kits I have made this one was extremely easy to assemble. All told, it only took about an hour. Here’s the finished product:

IMG_2913

What you can’t see: my impressive soldering ๐Ÿ™‚

But the true test was to come. Skeptically, I connected it to my ‘TV that exists just for old game consoles” and turned it on…

The ball moves so quickly it’s almost impossible to hit it, even in the 1P mode. But whether it is playable is immaterial: it worked first go!

Even if you’re not impressed by that, I was ๐Ÿ™‚