2011-09-24

2 Barbies 1 Cupcake

post removed because it might violate Google's ad program policy. See here instead http://xahlee.org/sex/2_girls_1_cup.html

Why Are Scores in Video Games Mega Huge?

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/game_scoring_system.html

Why Are Scores in Video Games Mega Huge?

Xah Lee, 2011-09-24

Have you ever noticed that the score in games are usually bizarrely huge?

Instead of one to a hundred, it's usually millions and billions.

This is so in pinball games, video games, online games. They are not just huge, but grows exponentially. A rookie would start with thousands, a average player gets millions, while a expert has a score of gazillions.

flag pinball-s bejeweled flame gem explode
Pinball and Bejeweled.

From a mathematician's mind, the scoring system should be a accurate indication of your skill in the game, and linear too. If you plot the scores from beginners to expert players, it should look like a straight line going uphill. So, you'd think, that game designers, who are usually nerdy engineering types, would strive for such a perfect design of scoring system.

So, why are video game scores this bloated 9 or 10 digits figures?

Answer: $money$.

You see, it's from the psychology of human animals. You feel much better when your score is 1000 instead of 1. And when you hit jackpot or executed a skilled maneuver, weird elation sprung forth when you see your number skyrocket with wild sound effects. Ding Ding Ding, YOU won mega million points! Therefore, the starting point is 1000, not 1, and award points are in terms of the mega or giga or 2x 3x instead of a reasonable fixed amount.

But what does $money$ have to do with this?

You see, game makers, from large to small, for the most part, are commercial endeavors and enterprises. They learned, when the scoring system contributes to pleasure, people put more money in.

I then wondered, why don't these idiotic scores use astronomical numbers then? Say, start with 1000000000, and experts have scores like 1000000000000000000000. A short reflection shows that, of course, when the numbers gets incomprehensible, it lost its effect. It has to be in the range of millions and billions, no larger.

Emacs Lisp: Replacing HTML Entities with Unicode Characters

Solution to yesterday's problem: Emacs Lisp: Replacing HTML Entities with Unicode Characters.

2011-09-22

emacs quiz: replacing html entities with unicode char

here's a emacs quiz for you advanced emacs users out there.

I have a file with content like this:

…
<tr><td>pound</td><td>&#163;</td><td>pound sign, U+00A3</td></tr>
<tr><td>curren</td><td>&#164;</td><td>currency sign, U+00A4</td></tr>
<tr><td>yen</td><td>&#165;</td><td>yen sign = yuan sign, U+00A5</td></tr>
<tr><td>brvbar</td><td>&#166;</td><td>broken bar = broken vertical bar, U+00A6</td></tr>
<tr><td>sect</td><td>&#167;</td><td>section sign, U+00A7</td></tr>
<tr><td>uml</td><td>&#168;</td><td>diaeresis = spacing diaeresis, U+00A8</td></tr>
<tr><td>copy</td><td>&#169;</td><td>copyright sign, U+00A9</td></tr>
…

I need it to be like this:

…
<tr><td>pound</td><td>£</td><td>pound sign, U+00A3</td></tr>
<tr><td>curren</td><td>¤</td><td>currency sign, U+00A4</td></tr>
<tr><td>yen</td><td>¥</td><td>yen sign = yuan sign, U+00A5</td></tr>
<tr><td>brvbar</td><td>¦</td><td>broken bar = broken vertical bar, U+00A6</td></tr>
<tr><td>sect</td><td>§</td><td>section sign, U+00A7</td></tr>
<tr><td>uml</td><td>¨</td><td>diaeresis = spacing diaeresis, U+00A8</td></tr>
<tr><td>copy</td><td>©</td><td>copyright sign, U+00A9</td></tr>
…

How would you do it using emacs's power?

I'll post a solution in 2 days.

2011-09-24 Answer at: Emacs Lisp: Replacing HTML Entities with Unicode Characters.

Bejeweled Blitz Strategy as Math

Perm url with updates: http://xahlee.org/math/bejeweled.html

Bejeweled Blitz Strategy as Math

Xah Lee, 2011-09-22

Been playing Bejeweled for like 12 hours yesterday and today.

I don't know how people do it, but i just couldn't figure it out. Normally, my score is under 50k. (currently best score of 155k, but that's once in a hundred games)

i see my friends having score 170k and 320k, and i think that's not uncommon. Looking at youtube, there are people with score of 878k!

“Bejeweled Blitz 878,550 Points ‘Elite Technique’ Legit No Boosts Facebook”

On the other hand, been playing Diamond Dash for the past week. That one i easily mastered. Currently got top score at 358k and is the weekly champion.

Diamond Dash is fun but does not have much strategy. The key to high score is fast reflex. That's pretty much all.

Bejeweled is a bit complex. As far as i know currently, half of it is speed, but the other half is making optimal moves. (you need to keep getting the multiplier gem, and for that to happen, you need to get power jewels, and for that to happen you need to align 4 or more jewels in one shot)

I've read some tips online. The key to score high has 2 aspects: repeatedly getting the score multiplier gem, and make each move under about every 1 or 2 seconds for the speed bonus.

This seem a incredible task. I'm a thinker type of game player. If there's no time limit, i could spend several minutes per move, analyzing the optimal move. (the whole game is set for 1 minute playtime) I find it impossible to find the optimal move at the required speed.

I am guessing, that bejewel experts are not persons with machine-like lighting speed analytic mind. But rather, the mind naturally picks up patterns for optimal move, after repeated exposure. (e.g. thousands of games) I think, this is similar to the board game wei-chi (surround chess).

Am writing this because am pissed i wasn't able to raise my playing skill even after 2 days continuous play.

Here's some tips i've gathered.

Basic Rules

I assume you already played many games.

It is strange that the bejeweled official site does not seem to have a page that tells you the exact rules and scoring system of the game. Here's some facts i gathered about the game.

bejeweled
Bejeweled Blitz

There are 7 types of jewels: Blue, Green, Orange, Pink, Red, White, Yellow.

The grid is 8×8 = 64.

the above numbers are good facts to start to calculate probabilities.

Special Gems

There are 3 special Gems: Flame Gem, Star Gem, Hypercube.

Flame Gem (bomb)

bejeweled flame gem bejeweled flame gem explode
Flame gem.

Flame gem explodes like a bomb.

It removes all neighboring gems. (9 of them, counting itself. But if the flame gem is on edge or corner, then less).

When you match 4 gems in a row or column, you get a flame gem.

Star Gem (cross-zapper)

This one is like a electric bolt gun.

bejeweled star gem bejeweled star gem explode
Star gem.

It removes all gems in the same row and column, like a greek cross ✚. (15 total, counting itself)

To get a star gem, you have to match 3 vertical gems with 3 horizontal gems, in a L shape or T shape. (or it can happen in a greek cross ✚ shape during cascade.)

Hypercube (lightening)

Most powerful. Animated like a lightening storm.

bejeweled hypercube gem bejeweled hypercube gem explode
Hypercube gem.

It removes all gems on board of the same color. (the color that you swapped this gem with).

Match 5 gems in a straight line to get a hypercube.

Multiplier Gems

bejeweled multiplier gem
A 2x multiplier gem.

Multiplier gems multiply your score. First multiplier gem is 2x, then 3x, 4x, …. For example, if you got a 2x multiplier, then every point is doubled after that.

You get a multiplier gem whenever you clear 12 or more gems in one move. However, it seems no more than 1 per 5 second. For example, if you just got a multiplier 4 seconds ago, then you made a another 12-kill in one shot, but there won't be a new multiplier.

Key to High Score

The key to get high score is to get multiplier gems (and speed). And to get that, you practically need to get those power gems and hypercube every few moves.

Second most important is speed. When you make moves fast enough, there's speed bonus. (detail later) Basically, you'll have to spend no more than 2 second per move.

Remember, the game lasts only 60 seconds.

Practice Tips

… working on writing this section

Currently, i see 2 aspects. One is practicing speed. You need to make a move every one or two seconds.

But then how do you know which moves are optimal? The answer to this seems to be practice, practice, practice. After a few hundreds of hours, your brain will pickup and learn good moves by just seeing the board pattern.

But to speed up the process and make it more scientific, there should be some general tips about which moves are optimal. This will require some mathematical analysis of the game.

I see 2 ways to practice. One is taking your time to analyze each move, and don't worry about the score. For example, you might make just 5 moves in the whole game. (e.g. spend more than 10 second per move.) The goal of playing slowing is to get you to think and feel the pattern. When you think, you learn better on which moves are better.

You want to maximize making one of those special gems. Because repeatedly getting the multiplier is the only way to score high.

The other pratice you need to do sis speed. For example, if you play for a hour a day, you might do 30 minutes thinking thru each move. Then, for the next 30 minutes gaming, try to make each move as fast as possible.

Mathematical Analysis on Optimal Moves

much more to be written here … later.

bejeweled optimal move
A Bejeweled board configuration.

From a math perspective, there's clearly a optimal move. The choice is tough especially when there are lots possible moves.

This is the hard part of this article that requires much research. A true optimal move will probably require a computer analysis of search tree of a given board configuration.

But some rough guide should still be possible. There are many simple questions to be asked. For example, is it better to do vertical or horizontal ones? What's the best way to make a fire gem? What are the general, easy-to-understand, ways to move the gems to places you want?

Generalization of the Game

This game can be easily generalized. For example, the board can be triangular or hexagonal, and the board topology can torus or other surfaces. For pictures of different grid, see: Go Variations on Tilings. Also, it can be 3-dimensional or higher.

The number of different colors can also change. The fewer the color, the easier the game.

The rule of swapping can also be changed. Bejeweled lets you swap adjacent pieces. But for example, it could allow swapping of diagonal pieces. Or, the swapping could be a particular configuration (e.g. like chess knight's move).

The clearing of pieces can also be made into n-in-a-row, instead of n = 3.

In general, i think this game can be considered as a cellular automata. Such puzzles are basically infinite in variety, and no predictive mathematical theory are possible except of just running thru the game step by step. See: Go Board Game as Cellular Automata.

References

Here is a couple basic guides on strategy but nothing mathematical. I read them before writing this article.

  • Bejeweled Blitz on Facebook: Beginner's Guide to Playing and Getting a High Score (2011-05-24) Written by Finn Orfano, edited By Milawe. @ Source www.brighthub.com
  • Advanced Guide for Beating Your Friends in Bejeweled Blitz (2011-05-23) By Written By Milawe, edited by Michael Hartman. @ Source www.brighthub.com

g+

2011-09-21

The Word Foodie

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/foodie.html

the Word “foodie”

Xah Lee, 2011-09-22

[of those who put “foodie” on their profile in online social networks]

foodie. What a fucking word. Offensive to my eyes.

personally, i enjoy food too. I particular enjoy killing other animals, skin them, cut their body, and eat them. The blood and danger is a thrill that keeps me alive. Though, modern society has deprived me the pleasure as well as the labor of the killing, or the pleasure of running a slaughter house.

although i imagine if i had to do it everyday just to taste the flesh of a bull or birdie, it'd be becoming a drudge. But it's the basics of life i'd like to keep in touch. This, i would do instead of watching some horror or thriller movies.

so yeah, i enjoy food. But not just eating animals. Plants too. Slash them, uproot them, skin them, eat their seeds and pulps. Hell yeah. To be honest, nuts, broccoli, leafy greens, carrot, ARE among my favorite foods. Usually preferring them raw. And i've been eating lots of them about every other day for the past decade. (not so much broccoli recently)

but the word foodie... what a motherfuck fuckers fucking scumbag.

on the subject of words describing food, i'd prefer: victuals, edibles, sustenance, provisions, ration.

for those foodies, i propose you say on your resume: viands lover, instead.

foodies are those human animals who have become this numb living zombies with fine mouths.

and fuck the word gourmet too.

2011-09-18

songs dedicated to fucking

for your Sunday amusement, here are songs of human animals dedicated to tits, ass, and fucking