Log in

Mark Gritter's Journal
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in Mark Gritter's LiveJournal:

[ << Previous 20 ]
Tuesday, October 25th, 2016
8:42 pm
Principal Component Analysis
A similar technique to NNMF from my last entry is Principal Component Analysis. It still factors the input matrix, but now negative values are allowed. A big challenge for using PCA is what to do with those negative numbers, which have no standard interpretation. (This is one of the advantages of NNMF, that it can be applied in scenarios in which only positive values make sense.)

PCA is better at identifying features in my sample of pixel art, and degrades more gracefully as the number of components is lowered. The graphs here show original, reconstructed, and the PCA components separated by palette color. (Blue is negative, red is positive--- sorry.)

Reduced dimension (10 components.) Using nearest-neighbor of the blended colors works pretty well at reconstructing the original images:

However, the blends between flowers are, if anything, worse. Nearest-neighbor doesn't work very well at all. The best results I got were from capping the negative contributions at 0 and blending:

Sunday, October 23rd, 2016
10:14 pm
NNMF project
Some notes on a procedural generation project, just for fun.

Non-Negative Matrix Factorization is a dimensionality reduction technique. It reduces a set of samples (say, books consisting of words or images consisting of pixels) to a set of lower-dimensional "components". Then we can do fun things like interpolate between two of the samples by interpolating their component representation. One of the ProcJam 2016 speakers used this for blending Zelda levels; his talk can be found here: https://www.youtube.com/watch?v=3wcpLwvBTYo&feature=youtu.be&t=2h6m22s

I wanted to play around with this but lacked an appropriate data set that was easy to use. So I decided to try the flower pixel art from the ProcJam Garden Pack found here: http://www.procjam.com/art/tess.html

The first attempt was disastrous. Even with the number of components == the number of samples (which permits a trivial matrix factorization) I couldn't convince the NNMF implementation to learn the shapes. What I did here was build the matrix out of RGBA values.

So, my first thought was that we could make it simpler by using a matrix where there was one row per pixel per color in the palette (since the pictures are reduced-palette anyway.) This is actually a dimensional increase, but it means every training value is either zero or one. This produced somewhat more interesting results, not only successfully learning the shapes, but also managing to represent them with a little bit of dimensional reduction. Of course, subtleties between the similar shapes are lost quite quickly.

20 components:

16 components:

12 components:

In order to convert back from a vector of palette color indicator values (c0, c1, c2, c3, c4, c5) to RGBA, I first normalized (so the sum is 1) and then do a weighted average of the indicated colors. This is probably too linear to produce non-"muddy" results as you can see in the last image above and in the mixed images below.

So here's the first attempt at doing a 50% mixture between every sample, using the full dimension. Some of them are arguably a good mixture, but most just come out sort of grey or confusing.

The code for this iteration can be found in the Gist here: https://gist.github.com/mgritter/e11ce48beef1811feb6a2cab9b439f16

Probably the next thing to try is to switch the vector to RGB conversion to be nonlinear; perhaps just take the highest-ranked palette color. This would mean every output pixel uses the palette, which is a more faithful interpolation. But overall this doesn't look like a good data set for NNMF.
Sunday, September 25th, 2016
4:45 pm
Roguelike Celebration notes 3/3
Practical Low-Effort PCG: Tracery and data-oriented PCG authoring by Kate Compton (@galaxykate on Twitter). There were two parts to this talk, one on Tracery (https://tracery.io) and another on AI techniques in general.

Tracery is a tool for generating text from a grammar. This is a project near and dear to my heart, because I did the same thing for one of my first Java applets. Sadly, "The Technobabble Generator: a Recursive Random Grammar Unparser" has been lost to the mists of time, and not even the Internet Archive can attest to its existence. To me, this is sort of an object lesson in how much the world has changed. In 1996 we didn't have Github or even much of a Javascript ecosystem, and those are what has allowed Tracery to go from a personal project to a reusable facility.

Tracery's language is JSON-based and pretty easy to use. Kate pointed out that SVG is just text, and has some very cool procedurally-generated dresses and spaceships. JSON is just text, so people have even created tracery-generating tracery schemas. A Twitter bot hosting service, CheapBotsDoneQuick, uses tracery. And it's been ported to other languages from its original Javascript implementation. I put together "Your Next Roguelike" using this hosted service: https://twitter.com/NextRoguelike

The larger point she made is that when each piece of content requires its own code, STOP AND THINK first. What can you do instead to turn code into data, or use a tool? "Don't whittle your own screws". An example she gave was how, in the Sims, furniture actions and effects were all controlled by attributes which made it very easy to launch expansions.

(Did I mention Kate did the planets in Spore? She's gone back to school for her PhD.)

Examples of finding artificial intelligence "parts" out in the world:
* Finite State Machines: build an interpreter, not a FSM in code
* Decision Trees: once we have the tree as a data object separate from its implementation, it can be manipulated on its own. Examples: log which paths are being taken, evolve/modify/apply machine learning to the tree
* Constraint Sets/Solvers: e.g., Clingo (https://github.com/potassco/clingo) can be used once you cast your problem in this form. see "A Map Generation Speedrun with Answer Set Programming" https://eis-blog.soe.ucsc.edu/2011/10/map-generation-speedrun/
* Visualization tools. She mentioned an interesting effort in visualizing game logic which can be found here: http://ice-bound.com/news/visualizing-the-combinatorial/ While I got a pitch and demo from the author of "The Ice-Bound Concordat" later in the day, it didn't really click with me.

"Markov By Candelight" by Caves of Qud author Jason Grinblat. He described Markov text generators (like those behind Erowid Recruiter https://twitter.com/erowidrecruiter) and wanted to find a way to use them to generate in-game book content for his game, which actually tied back into the plot.

To do this sort of thing well you need to curate your training corpus well. Fortunately, Caves of Qud already has a lot of text in terms of in-game books, NPC dialogue, help files, quest text, object descriptions--- totaling about 45,000 words. So he mixed that with a couple of 19th century physics texts available on Project Gutenberg, about another 45K words. That produced a mix he was happy with, definitely game-relevant but also coming across like there had been centuries of linguistic drift, data corruption, and unknown referents.

Titles are hard, because they have extra structure. After trying a "mad lib" style templating approach he went back to Markov generation but chopped off undesirable words (about 30 of them.) Then he added some extra variation by sometimes including an author's or editor's note, appending "volume 1" to the title, making the book extra-long, etc. These were meant to combat the feeling after a while that all the Markov text looks "just about the same."

How to turn this into a game mechanic? He looked for common prefixes which turned out to be combinations like "in the", "of the", "to the". Then he can bury a secret in the books by making it one of the generated text options that follows these common prefixes (but as an indivisible unit.) So a book might have "... of the {something cool} which I hid six miles east of {place}." The frequency can be tuned; he aimed for about one such secret in every four books.

How Brogue Tells Stories by Brian Walker. What makes a situation in a game exciting? And how to you generate those experiences? The biggest reason roguelikes get stale is because it's not longer cognitively interesting to optimize (because the crowdsourced guide tells you how to do so.) So how do you get the most bang from new content? Classes probably aren't balanced, and there is probably also a dominant build within each class, so probably enhancing the environment is a better payoff.

Brogue does "improvised item-based advancement" where your character gets better because of equipment, rather than experience. But you're essentially on a budget of reusable "skill items" (weapons, staves, charms) and disposable "skill point items" (scrolls of enchantment.) You only see a subset of the available skills per game, so you have to improvise--- and commit before you know the whole set. So advancement != combat, enabling different play styles. The game rewards trickiness, a *player* skill not a character skill. And each dungeon produces subtly different character types.

The fallout from this decision is that effects can be intensified, and indeed should be because you want different builds to really feel different. The way he balances power is with situationality. For example, autohit is much more fun than a "-4" bonus for webbing. But that really only matters if the monster was hard to hit anyway! Axes don't just attack three adjacent characters, they attack *all* surrounding characters.

One way to create "situationality" is by making spaces interesting. Brogue does this with combinatorially overlapping zones, each with its own advantage and disadvantage. Terrain is more interesting than monsters, and is more self-explanatory and easier to plan around. This leads to emergent narrative from the player! (I have played some Brogue since his talk and this really happens--- one of the most fun things is figuring out how to use a trap or bridge or chasm against the monsters.) The interaction between terrain types and between monsters and terrain creates different "zones": for example, light of sight, a monster constrained to a terrain type, area of effect, vertical/horizonal effects, light levels, monsters avoiding chokepoints, etc.

(I asked one of the questions here; I was trying to get at whether guides also "up level" by becoming interactive--- there's still some optimal decision path to be found, it's just no longer static. He talked about the evolutionary race in general terms, but there's no "solver" for Brogue out there yet. There are, however, interactive guides for other games, though I forget the example I learned at the conference.)

This really tied back to other talks I'd heard about managing and exploiting combinatorial explosions. In my day job, I try very hard to make sure that combinatorial effects *don't* happen. Using feature A and feature B together should not cause a surprising interaction. But in a game, that's what you want! That provides novelty, it provides the opportunity for "wit", it gives a game a depth of behavior that would be hard to build piece by piece.

I'm not likely to rush out an build a roguelike, but maybe I'll participate in the 7DRL challenge next year. (My teenage attempt to write something Nethack-like in C++ was buried under the weight of its own ambitions.) But the conference was very thought-provoking and gave me a bunch of new games to try: Brogue, Rimworld, Caves of Qud, Strange Adventures in Infinite Space, DungeonMans, Transcendence. All the talks I attended were great, and I really encourage you to watch the videos. Drew Streib's talk on running a public Nethack server in particular is worth a listen to get the "ops" perspective instead of the "dev": https://www.youtube.com/watch?v=z3jwPszSgwg
Saturday, September 24th, 2016
11:09 pm
Roguelike Celebration 2/3
Angband by Erik Osheim and Robert Au, two of the current dev team. This was an interesting insight into being a maintainer of a codebase not originally your own. In fact, the very first Angband authors passed it on nearly immediately--- because they were graduating from college. This system broke down around 2005 when the transition from one benevolent dictator to another failed. This lead to the creation of an official dev team (and relicensing in GPLv2) with a more collaborative approach and better coverage for succession issues.

But the question of "what is Vanilla Angband" hasn't been answered! The sense I got is that this is something the dev team still struggles with--- what is their job? Some of their changes were obvious: prune the ports (old platforms no longer testable), induce less RSI on things like targeting missile attacks, and support UTF-8. But Angband circa 2005 was undergoing a revolution in play style of rapidly diving to lower levels. This increased the danger to the player--- but also provided better rewards, and trained the player in avoidance techniques that were crucial to the endgame.

They decided to embrace this strategy and made some gameplay changes to support and encourage it it. One is "forced descent" to prevent the player from farming easy levels. Another is selling more staples in town, and removing selling of items. (They also removed Charisma and haggling, but that is more in the "obvious cleanup" category than a "rebalance the game" change.)

They briefly mentioned some simulations they did, but didn't go into detail--- this would be interesting to look into. They also said that it's hard to tell whether players are actually happier with the game, given that lots of players never post on the forums to complain. :) I wonder how many roguelike games would benefit from "phone-home" functionality that tells the dev team what players are actually spending their time on.

What didn't get fixed: documentation and testing, like any other open-source project. A google search still turns up a guide from 1996 as the top result.

"The Infinite Dungeon" (originally titled "Difficulty in Roguelike Games" in the program) by John Harris. This was one of the most thought-provoking talks to me. John asks why, in a golden age of roguelikes, does he have difficulty building enthusiasm for some of the new offerings?

He goes back to some of the first procedurally-generated content. TSR's Strategic Review, Volume 1, Issue 1, has an article on randomly generating dungeons in D&D. But this sort of generation is not really interesting. It's ultimately just a linear sequence of challenges. It's literally gambling--- stop now or go on? Because the structure of the environment you've seen so far has no bearing whatsoever to what comes next. (If you back up and try a branch you passed over before, the next room will be the same as if you stayed where you are.) Rogue does better at giving an actual sense of place.

Contrast those, however, with an early D&D adventure like "Village of Hommlet" that has layered depth and backstory (and surprises!) I sometimes think the temptation is always to add too much--- I always wanted everything to tie together in my Shadowrun campaigns, but the real world does have things that are more or less as they seem. But the point John made is that this backstory and design is something players can exploit. They could figure out that the monsters are likely to have a midden, and go look for it. How could we do the same in roguelike games?

He proposed a trichotomy: knowledge, logic, and wit. (Though he doesn't much like "wit" for the third category.)

1. There are things about a game you could look up in a FAQ or guide, that are able to be written down. Like, here are all the possible potions in Nethack.

2. There's inferences you can make from the knowledge: if I know X, then Y must be true too. If I've fought a tiger, the other room must have a lady. If there is only one unknown potion, it must be Z.

3. Then there are things that constitute "game playing ability" or the ability to discern intent behind a game. It's the application of common sense or intuition or pattern-finding abilities to things not yet encoded in guides.

How can we make games where we get to exercise our "wit"?

(Brian Walker, whose talk I'll cover in the next entry, had some thoughts about how story emerges from place/space/environment in Brogue. But each level in Brogue still feels random, in that there's no geological reason why there's a pool of water one place and not another--- or maybe I just haven't figured it out yet.)

Dwarf Fortress Design Inspirations by Zach and Tarn Adams. This was basically a love letter to their wasted childhoods. :) But more than that, it was a fascinating look at how they put the things they loved in games into their own game. Even their earliest games (text-only scrolling narratives) incorporated the elements that they knew how to do at the time, like remembering what killed you.

Permadeath in roguelikes is often coupled to a high score list. They view Dwarf Fortress's legends mode as an evolution of that same high score list--- recording what you did for later use or comparison. The Hack "bones file" was a revelation for them and is translated almost literally into their initial vision for Dwarf Fortress: build a fort, then explore its ruins.

They also talked about games they have not yet been able to incorporate. The game Ragnarok features climactic final battles among the gods. They'd like Dwarf Fortress to have the same sort of arc where great powers arise and ultimately shape the world in large-scale ways. This seems like something that might also edge into John Harris's "wit" --- if you know the shape of the story, you can exploit it.
Friday, September 23rd, 2016
7:42 pm
Roguelike Celebration notes 1/N
Last weekend I attended the Roguelike Celebration (roguelike.club) at the Eventbrite headquarters. All the recordings are available online. Each session is short, only a half hour each, but the conference did have to split into two tracks. Here are my notes from ones I attended in person.

A Love Letter to Hack by George Moromisato, author of Transendence, a space exploration and shoot'em'up game. He talked about the ways he was inspired by Nethack and tried to apply the same lessons to his game. So what's so awesome about Nethack? Despite its crude ASCII nature, it came out in 1987, the same time as Ultima V.

He contrasts "graphical immersion" with "interactive immersion", "quality" vs "variety" and "experience" vs "mastery." The last axis is sometimes talked about as "replayability", but the distinction he's drawing is more about whether you are continuously learning the game, or just going back for another helping.

One of the key features he identified was the "illusion of winnability." Even though you almost always lose, there's a sense that "if only I had done X". Nethackers label this "Yet Another Stupid Death." But the combinatorial explosion of possibilities makes it hard to win even an "open book test" like Nethack where you have unlimited time to make up your mind. This combinatorial explosion and interaction was a common theme at the conference.

Because George is writing a space game, he found it hard to take advantage of another of Nethack's strengths, which is relying upon the player's knowledge of the world. Yes, Nethack is a fantasy game and has its own set of conventions. But it also has monsters the are familiar to fantasy fans, and interactions like "getting things wet" behave like they do in the real world. In a space game, this is harder, because the interactions between different technologies doesn't have the same sort of standard vocabulary.

A third feature he characterized as "quantity is quality." Interacting with 100's of monsters is its own good experience even if each of them is just an ASCII letter and a small set of behaviors. It's the combinatorial explosion of attributes interacting which makes this variety possible. Roguelike developers provide the most benefit when they add "one more experience" to the game rather than higher-quality content. He characterized this as "building a city, not a resort."

Accessibility in Roguelike Games" by Alexei Pepers talked about a project to make Nethack more accessible to visually impaired players. (Believe it or not, some do play it by using screen readers pronouncing the punctionation characters on the screen!) Her main idea was new commands that describe your surroundings in text, including the exact offsets in terms of relative number of tiles. Backtracing and mapping is also hard, so they also added some shortcuts for navigation ("head back to the staircase.")

Alexei characterized three main lessons learned: (1) No substitute for feedback from visually impaired users. They did some of their experiments with sighted players with the map turned off. But that population are not experts in screen-reading software! (2) Give users options on how exactly to get info, for example NSEW vs up/down/left/right. (3) The complexity of games leads to a lot of special cases. For example, a common tactic in Nethack is stealing from shops by training your pet to pick up items and put them down in the store entrance where you can grab them. A large store may have tons of items and having screen-reading software describe them all every clock tick, in order for the player to figure out what their dog is doing, is a complete pain.

Corridors in Nethack, and some of the lower levels, are very difficult. Precise spatial information using text is hard, while maintaining the sense of immersion that makes the game fun. (One idea that I'd like to see is building a tactile interface for showing the shapes of corridors--- but I don't have the time nor skills to put one together.)

Concrete Poems by Nick Montfort (a poet.) There was a lengthy opening discursion on why a tweet is limited to 140 characters, as an example of the "history of material texts" that Nick is interested in. But this left frustratingly little time to talk about roguelikes! (It's an entertaining enough exposition, so you should watch it.) Why were compute terminals a grid? Because of typewriters, which need to advance by the same amount on each letter. Previous typography was, sensibly, proportional.

But what really got my attention is talking about "Concrete poetry" and some of his examples were stunning. This is poetry that uses the typewriter, but in a "dirty" form: moving the paper around, masking letters, changing the ribbon, etc. He presented this as an early exploration of how artists made "space" out of ASCII.

His challenge was what roguelike developers can do to make something as visually stunning as the examples he showed, like Steve McCaffery's "Carnival".

(I have notes on several more sessions which I'll post later, but each session had a lot of depth so my writeups tend to be long.)
11:24 am
A micro-study of NFS operation sizes
Over at the Tintri blog, I wrote a study of NFS operation sizes in Tintri's customer base. I looked at averages weighted by operation and by byte, and tried to apply K-means clustering to the data to discover patterns of usage.

Here's a visualization I didn't include in that blog entry. It shows a timeline for several production VMstores, with each time point colored based on the characteristics of its read sizes. Many VMstores have a stable workload, others less so. (White areas are missing data.)

Tuesday, September 6th, 2016
9:46 am
The Apple situation is not hard to explain, despite what many journalists seem to imply.

1. Apple told the EU that they were paying taxes in Ireland

2. Apple told Ireland that they were paying their taxes in the US

3. Apple told the US that they were holding the cash overseas instead of bringing it back and paying US corporate tax rate

Step #1 is recognized practice in the EU, Step #2 is acceptable to Ireland, and Step #3 is legal in the US. What the EU decided is that if the net effect of #2 and #3 looks like a special tax benefit specifically for Apple, it should be treated as one. That is. Ireland "should have" collected the taxes as the money goes through, instead of participating in the shell game. Specifically, Ireland's tax guidance that it was OK for all the European profits to be allocated to a notional Ireland-based "head office" (step 2) was what triggered the commission's ruling.

Apple, of course, is waiting for the next tax holiday or a really good reason to spend the money. Then they can either bring it back to the US (paying the lower rate rate; politicians are talking about 15%) or spend it in Europe and finally pay their Ireland taxes.
Sunday, September 4th, 2016
12:26 am
If we are going to have price controls on out-of-patent prescription drugs, this seems like just about the worst way to do it: http://www.slate.com/blogs/moneybox/2016/09/02/hillary_clinton_has_a_quietly_bold_idea_to_stop_drug_price_spikes.html The proposal is to have a committee evaluate whether price increases have been "reasonable" and, if not, impose fines or rebates.

The theory, perhaps, is that fear of government action will cause drug manufacturers to play it safe. However, by the time the hypothetical committee makes its findings, a significant amount of damage will probably already have been done. The whole thing seems sort of arbitrary in that the decision is after-the-fact and literally punishes success in pricing (not that this is necessarily a socially useful form of success.)

We have a model for this: electricity pricing. The power company goes to a local authority and proposes a rate, and gets a yea or nay for the next year or so. An out-of-patent drug fits this model pretty well--- there are no R&D costs here, just capital costs of maintaining the ability to produce it. It removes the uncertainty about what you're actually allow to charge, and prevents patients and insurance companies from bearing the costs up-front.
Saturday, July 16th, 2016
12:15 am
Arkham Knight
The fourth in the Batman series by Rocksteady Games.

The good:

I found the game fairly narratively satisfying (yes, even the awful third ending) with a few exceptions. It was firmly tied to Arkham City and the events there, rather than ignoring the previous games.

Most of the Riddler's puzzles were genuinely interesting to figure out rather than being exercises in perfection.

I <3 Cash's comments about all the items in the evidence room.

The additions to melee combat and stealth mode were reasonable and added some challenge.

Not so good:

I know this isn't a Bioware game, so your choices don't really make any difference. But I hate it when it's pointed out to you that your choice doesn't make a difference by circling around again and making you pick the "right" choice. If you had to play the rest of the game as Robin instead, that wouldn't be so horrible, would it?

The villain's identity is not a secret to any informed Batman fan. Despite trying misdirection, which doesn't work in the DC universe anyway. Similarly, Barbara Gordon's death is unconvincing rather than tragic.

Just how Scarecrow finances this huge army of men and drones is never really clarified, even in the audio files. With multiple billions of dollars he could probably create fear at a large scale somewhere other than Gotham, much more efficiently.

Arkham Asylum and Arkham City take place in small, bounded environments and that's OK--- it even adds to the atmosphere. Arkham Knight takes you into the city proper (three separate islands) and still feels tiny. This is particularly bad when you're chasing somebody through the streets and they keep circling the same few blocks because that's all there is.

The "stealth" tank battles were merely tedious. I hadn't taken out all the watchtowers or roadblocks but it didn't seem like they coordinated. The antagonists should have been using one of their flying drones (kept in reserve) to spot Batman.

Actively bad:

The running tank battles are fine (though I was annoyed because I didn't realize the Batmobile had a cannon for quite a while, which made puzzles that required the use of the big gun frustrating when I tried to solve them with the machine gun.) But the experience of driving the Batmobile made me feel like an incompetent driver, rather than experiencing what it would be like to be Batman racing through the streets. The hand-to-hand fights do a good job of putting you in the Batman fantasy. Tearing through the streets causing widespread mayhem, not so much. The amount of damage Batman does to the urban infrastructure is quite frankly unconscionable. It made me feel like I was playing Saints Row, not a Batman game.

The game's intro assuring you that everybody good has been evacuated from the city, thereby giving you permission to run rampant on the remaining citizens, is appalling. While the Batmobile has "non-lethal" features, I'm pretty sure some number of thugs I hit with the car would have died. Particularly the ones whose heads I parked on.

One of the things I liked about Arkham City was playing as Catwoman. Arkham Knight gives you two-hero battles in which you can switch back and forth between Batman and whoever's fighting alongside you (Catwoman, Robin, or Nightwing). Not only is this less satisfying, but you don't get enough time with an alternate character to really learn their combat moves. The melees are all "big", not giving a lot of room for experimentation. (It looks like the alternate-character content was moved into DLC, and the reviews of the DLC are not great.)
Tuesday, June 28th, 2016
12:46 am
Towards a Taxonomy of Crafting Games
Minecraft pretty much set the standard for survival sandbox crafting games and judging by Steam queue, we haven't really made much progress since. Here's an attempt at breaking down the core elements of the genre.

"Crafting" games are those in which the player combines multiple resources into higher-value items. The key challenges for the user are opportunity cost (a resource used to build X cannot be used to build Y.)

Goal: survival (build shelter and fend off baddies), efficiency (produce lots of X, or the best-cost solution for X), wealth/achievement (make lots of X)

Progress directed (fixed path or goals), sandbox (free placement and open decision-making)

Actors: first-person, character, directed agents, third-person omniscient ("god mode")

Environment: 2-D surface ("top down" or isometric view), 2-D plane ("side scroller" or "platformer"), 3-D

Example games I have played:

Don't Starve: Survival, Sandbox, Character, 2-D isometric

Played this a while back. Didn't get very far into it.

Infinifactory: Efficiency, Directed, First-person, 3-D

Very fun game about setting up production lines. Not a lot of choice in what you produce, but plenty of freedom on how to do it.

Triple Town: Wealth, Directed game with Sandbox metagame, Third-Person, 2-D surface, mashup with match-3

This one is a bit of a stretch. Unlike other crafting games, while you can only combine multiples of the same element, and combinations are formed via placing groups of three or more.

Factorio: Survival (though I play with enemies disabled), Achievement (build a spaceship), character but with heavy automation, 2-D surface

This is all about setting up large-scale industrial infrastructure. Achievement is not enough to make me actually finish the endgame. Sandbox is pretty fun, though, since the goal is to build machines to build things, not just craft everything yourself.

Craft the World: Survival, Achievement, Sandbox, Directed Agents, 2-D plane

Currently playing, sort of a 2-D Dwarf Fortress, of which there are many options. May be done soon, been through one endgame, and the different environments are not enough to keep me hooked.

Terraria: Survival, Sandbox, Character, 2-D plane


Dwarf Fortress: Survival (doomed!), Sandbox, Directed Agents, 3-D world (with 2-D views only)

Really, I frequently ask myself why I'm not playing this more. The NetHack of this genre with many object interactions.

Puzzle Craft: Wealth, Directed, Third-Person, 2-D plane, another match-3 mashup

Definitely a crafting game, the main game is used for collecting resources, while the metagame involves building the village, but in a very strictly controlled manner.

Swords and Potions: Wealth, Directed, Directed Agents + Third-Person, 2-D isometric

Create a shop, build up the town with items made there, to produce more raw materials. Sell to adventurers, or outfit them to send on quests. Kind of grind-y but I would like to find a game like this with more depth.

The problem is when I look at the new games coming out in this category, they all seem to be concentrating on some axis I don't really care about. Some are science fictional instead of fantasy. Many are trying for better 3-D graphics or incorporating some more role-playing mechanics. But very few seem to have a unique goal, or a unique mechanic, that makes them at all interesting to me.

About the only one I considered was Blueprint Tycoon which is a stripped-down efficiency game sort of like Factorio.
Wednesday, May 11th, 2016
2:33 am
The Zuckerberg Master Plan
There was a lively discussion on this week's Slate Money podcast about nonvoting shares.

The theory Felix Salmon tries to expound upon is the following:

1. Mark Zuckerberg decides he wants to, say, control all media.
2. He issues a bunch of nonvoting Facebook stock and buys media companies with it.
3. Although common stock holders are diluted, Zuckerberg doesn't care and retains total control of Facebook.
4. Repeat until Mark Zuckerberg controls the world.

How far towards world domination can Zuckerberg proceed?

Facebook is worth $344 billion, with 2.3B shares. Disney has a market cap of $174 billion. If Zuckerberg wants to buy Disney, he needs to offer, say a 30% premium or $226 billion. That means post-merger the combined company should be worth about $54b less, or $466 billion.

Can Zuckerberg then rinse and repeat? At what point does everybody sell their nonvoting shares, leading to a valuation of $0 instead? Or does Facebook stock retain enough value to literally buy everything?
Monday, May 2nd, 2016
5:01 pm
Data! and Graphs!
Over at the Tintri corporate blog, I measured our customer's virtual machine sizes: https://www.tintri.com/blog/2016/05/data-dive-vm-sizes-real-world
Saturday, April 16th, 2016
11:06 pm
Structural problems in "Daredevil"
(The Netflix version.)

1. Severe head trauma and even broken bones can and do kill people. Particularly people who don't get great medical attention because they're criminals in a poor neighborhood.

So, having Daredevil and the Punisher argue about killing is more than a bit deliberately obtuse? Odds are at least one of Daredevil's victims has perished from a blood clot or infection or brain bleeding or some other complication from the initial beating. I don't expect this to come up in the remainder of S2.

I realize this is not unique to Daredevil. ("Arrow" even gave Ray Palmer a potentially fatal blood clot as a result of being shot by an arrow. I don't expect the same concern to ever arise again there either.)

2. Daredevil can fight in the dark. He is shown taking out light sources in order to use this to his advantage. (Bet the residents and landlords love that, in addition to the bloodstains and drywall damage.) But because it's TV, they don't want to just show a completely black screen during a fight scene, so instead there's plenty of ambient light left to see the action. It's just dim, not dark.

Perhaps this could have been handled with some visual convention. (I don't buy "dim lighting" itself as the convention.)

Dim lighting also allows the use of the stunt double.

3. Matt and Foggy are contemporaneous young lawyers, right? They're millennials. They would not make "Top Gun" references. They make other cultural references that are fine for me as a 40-year old, but I cannot believe two 20-somethings would say.

The design in Matt's childhood scenes attempt to look as if he is growing up in an older period than he possibly could. If he's under 30, he was born no later than 1986 and so grew up in the 90's.
Friday, April 15th, 2016
8:53 am
No thanks
This sounds like my personal version of hell:

What would you call the immediacy of Instagram; the impulsiveness of Tinder; and the exclusivity of a private Playboy Mansion event – all wrapped up into a new Super App? We call it a helluva lot of fun! Our client is about to fundamentally disrupt the traditional advertising/promotional model for event driven businesses with a crowdsourcing platform that encourages and incentivizes a "who's who" of ideal target participants to join the party.


POSITION: Chief Technology Officer Technology / Vice President Engineering & Product Development. This is a management position. You will be part of the core executive team that includes the CEO. Initially, this will also be an individual contributor position.

And it's in LA. It's really the last line that sells it.
Wednesday, April 13th, 2016
11:20 pm
Combinatorial Auctions and Implicit Collusion
I am rereading selected bits of "Combinatorial Auctions" in preparation for my session at Minnebar next week.

Here is a completely factual thing that happened in the U.S. government PCS spectrum auction (a simultaneous ascending auction). Bidders who wanted to discourage competition would engage in "code bids" against smaller carriers. Suppose A bid on on a block which B wanted. B then bid on a block for which A was the current leader, and which B had not previously indicated interest. The last three digits of the bid encoded the lot number for which the bid was "punishment."

Source: http://ftp.cramton.umd.edu/papers2000-2004/cramton-schwartz-collusive-bidding.pdf

This tactic appears to have been successful. There is also some evidence of "demand reduction" in which carriers strategically decided not to bid on additional spectrum allocations in order to keep overall price levels lower.
Wednesday, April 6th, 2016
1:48 am
Fantasy tournament design
Fantasy and science fiction tournaments have weird and terrible structures. There doesn't seem to be much reason for this other than to provide the author with the joy of explaining the tournament. Occasionally it may impact the plot. But nobody just runs single-elimination, double-elimination, round-robin (like chess or Scrabble), or World Cup-style tournaments.

The Element Games (Essen Tasch) in "A Gathering of Shadows": This otherwise lovely book has a 36-person tournament which proceeds in:
  • two single-elimination stages
  • a round-robin group of three which is decided by points scored (so you could lose two and still proceed, I think), and
  • a three-way championship match
Also the winner gets to host next year, like the Americas Cup. Changing formats for the championship is a standard trope, but makes little sense in terms of design. (Are the fans bored already?) Particularly when the honor of hosting is on the line, the final match comes down to coalitions rather than magical skill.

Azad in "Player of Games": two 10-player matches, and several 2-player matches (including the championship), but the dreaded 3-player match is thrown in. Some political justification in letting the dominant third ("apex") gender kick out males and females in the first round, which is a 10-player match. The purpose of the second 10-player match is less clear; perhaps this could serve to demonstrate that top Azad players can engage in coalition-forming, a useful real-life skill. But from a practical point of view, it's better to run both the 10-person matches immediately--- otherwise you need host a lot of two-player matches. There's no attempt at an excuse for three-player matches and it's a non-event in the book.

Triwizard Tournament in "Harry Potter and the Goblet of Fire": a purely arbitrary (and easily rigged) magical sorting artifact reduces the competitors to just three in a single stage. While this allows more challenging (and expensive) trials to be set up, there seems little justification for believing that the cup has really selected the best competitor from each school. There is little drama, either, and the fans would probably appreciate seeing a larger field to start.

The tournament itself resembles a decathlon, with competitors engaging in various tasks and challenges. But rather than an objective scale of point awards, or purely time-based scoring, the judges engage in further arbitrary decision-making based on "spirit" which allows them to promote their favorites. (The tasks are spaced out over the course of a year for no good reason.)

The blatant point-rigging is OK, because the points don't matter anyway, serving as only an insignificant handicap on the final task, a labyrinth.

(Quidditch, surprisingly, appears to have a fairly standard tournament structure--- all the misdesign was saved for the game itself.)

Assumption in "Last Call" (Tim Powers). This looks like a poker game. But the real object is to lose the "assumption" all-or-nothing side bet after merging hands with your victim. As a poker game this is a real mess, and virtually no spectators will understand who has actually won.

Hunger Games in "The Hunger Games": while theoretically designed for showmanship, the actual structure of this battle-royale tournament doesn't lend itself well to televised drama, requiring frequent intervention by the Gamemakers. The Cornucopia is an obvious "rules patch" to force early conflict and reduce the large number of contestants. (Otherwise, an equilibrium strategy is likely to wait for others to become injured.) Unwatchable in real-time, this blood sport probably gets cut down to just the 18 minutes of real action for most viewers (similar to a compressed baseball game.) Unfortunately, there's only one per year. Would be much improved by scheduling smaller weekly matches, but then the poorer Districts wouldn't feel quite so oppressed. Which, to be fair, seems to be the point of the exercise anyway---- the Capital is nobly willing to forgo entertainment value to promote heavy-handed social allegory.
Monday, February 15th, 2016
4:08 pm
New Game -- "Splendor"
Marissa bought me "Splendor" for Valentine's Day: https://boardgamegeek.com/boardgame/148228/splendor I got to play it this weekend with Mike and Lily (my god-daughter.) The rules are simple enough that she had no difficulty playing at age 9.

Splendor is a card-collecting game. You pick up tokens from a shared pool in order to purchase cards that earn you points, and bonuses towards future purchases. Mike won handily by building up a large bonus in one particular color, which allowed him to make several high-value purchases using that color in a row. It is not clear whether this is a consistent winning strategy, since there is not a lot of choice of cards available, and most cards require multiple colors (as do all the "noble" bonuses.) We found ourselves a little adrift as to what was the best way to play --- specialization or generalization. So there is enough depth to be interesting, I think, without being totally lost.

It doesn't have the same feel of many building game in which an early lead cannot be overcome. It is definitely possible to interfere with the other players' strategies both by sitting on the tokens they need, and reserving cards that would be cheap for them. Our initial game was not particularly cutthroat in this way, though.
Tuesday, January 26th, 2016
9:30 pm
Legal Go Positions and Nonsingular Matrixes in F_3
A Go position is legal if there is no completely surrounded group of stones in it. It can be represented as an NxN array with each entry filled in as 0 (blank), 1 (white), or 2 (black.) I don't want to use the term "dead" because a dead group is a legal position, but an already-captured one still on the board is not. Note also that while players must alternate turns, 'pass' is a legal move so for example Black could fill the board all by herself without a single White stone. (But not fill in the last square as that would kill her group.)

A matrix over the finite field F_3 is also an NxN array with each entry either 0, 1, or 2. It is singular if its determinant is zero. The nonsingular matrices form a group under multiplication (because they are invertible.)

Owen Maresh asks how these two sets compare: https://twitter.com/graveolens/status/691732255333548032

For the easily-tractable cases, here is the answer:

11,232 nonsingular 3x3 matrices over F_3
12,675 legal 3x3 Go positions
6,996 that are both

24,261,120 nonsingular 4x4 matrices over F_3
24,318,165 legal 4x4 Go positions
13,518,392 that are both
Sunday, January 24th, 2016
12:43 am
Fermat's near misses
Using the technique described in my previous post, I attempted to answer this question on Quora: "What is the smallest possible difference between the sum of two perfect nth powers and a different nth power?" http://qr.ae/RO86UX

That is, what is the smallest nontrivial 'd' (in absolute terms) in the equation a^n + b^n = c^n + d?

After excluding the all-1 cases, and the cases where a = c, here are the best solutions for a,b,c < 10000:

8^3 + 6^3 = 9^3 + -1
5^4 + 5^4 = 6^4 + -46
16^5 + 13^5 = 17^5 + 12
2^6 + 2^6 = 3^6 + -601
2^7 + 2^7 = 3^7 + -1931

Here are some more computational number theory results on x^3 + y^2 = z^5: http://qr.ae/RO864s
Friday, January 22nd, 2016
1:10 am
In 1991 Daniel Bernstein published a short paper on a computational technique for solving diophantine equations of the form p(a) + q(b) = r(c) + s(d): https://cr.yp.to/papers/sortedsums.pdf He describes how a heap can be used to visit all sums p(a) + q(b), with a,b < H, in increasing order, using only near-linear space and near-linear time (in H). You can then set up two heaps and "increment" whichever one has the lowest minimum value, outputting any cases of equality.

Can this technique be efficiently parallelized, on a SIMD machine (such as GPU)?

A simple approach is to divide up the elements in one of the heaps. That is, instead of, say, [math]r(d) = d^4[/math], you could have a family of functions [math]r_i(d) = (192d+i)^4[/math], which partition the search space. Each thread gets a different function to work with. This reduces one of the heaps by a factor of 192, but the other is just as large. Where previously we did H^2 + H^2 heap operations, now we have to do H^2 + H(H/192) heap operations, and the operations on the smaller heap are more efficient in the worst-case as well. Also, every thread needs its own pair of *both* heaps which is somewhat memory-intensive, limiting either the size of the problem that can be tackled or the number of available threads.

We could also partition *all* of the inputs as long as every partition is tested against every other combination of partitions. (This is a natural optimization when some restriction on the equations can be found for some moduli, thus eliminating a broad range of possible solutions.) For example, if we divided all the inputs in half by parity, then we need to check 8 different equations. This again requires a pair of heaps per thread.

We could perhaps continue to use a shared heap for the left-hand side of the equation, at the cost of threads becoming idle when their minimum value grows too large. I don't know how to evaluate what this does to the speedup. It also introduces some serialization as the heap operation itself can't be parallelized.

A variation on the shared heap would "unroll" the left-hand heap and have a shared array of the next K values. I can't decide whether this is helpful or not.

On a side note, perhaps the availability of cheap large-capacity flash devices may make it feasible to apply techniques previously dismissed as infeasible due to space requirements.
[ << Previous 20 ]
My Website   About LiveJournal.com