Thursday, November 5, 2009

Algorithm Puzzle (quick)

Here is a quick algorithm puzzle that was asked during lecture.

Q: Suppose I have a data structure that is both a heap and a binary search tree. It stores N distinct elements. What is it?

A: Well, it must satisfy both the heap property (heaps) and the BST property. What are these properties?

heap property - all child elements are less than the parent element
BST property - every parent is greater than all of its subchildren on the left and less than all of its subchildren on the right.

So, how can we possibly support both of these properties in a simple, single data structure?

Easily, by creating a tree with only left children.
5
/ \
4
/ \
3
/ \
2

This is clearly both a heap and a tree.

Tuesday, November 3, 2009

Stratego AI?

Have you ever played a capture the flag type board game such as Stratego?
wikicurrent boardgame I have.

Well it may or may not be more fun than Risk. . . . It is a great game to feature as a mini game. Or perhaps make a huge 2player version.

Anyway, the AI that I always play against is horrible. I am wondering what is involved with creating a hard computer player? (That is, one with a high win %?...or one that is fast. What are the trade offs?)

Some things that I think an agent would need to do:
1) Create strong starting position (for example, don't accidentally trap key pieces) before game has even started.
2) Collect material. This comes in at least two parts:
a)Preserve your pieces. Don't risk killing valuable pieces if you are "not positive" that you will win. (This idea is called "fuzzy logic." Here is a great article from BYOND about using fuzzy logic in your game..
b)Capture when possible. Computing when exactly you should and should not capture may be difficult. It would involve the priority of each piece, and a few other things that are too much right now.
3 Save/analyze past states. Perhaps debatable. . . . Could an unbeatable agent be created if it were allowed to process the entire game? Is that fair for other players/agents?

Monday, November 2, 2009

Internet friendships

One topic that I was recently talking to some friends about concerned online friendships. Some people had stories about onilne friends they had made over the years. These could be fellow web designers, like minded musicians, random game friendships...just random people you have ran into on the web and forged a friendship with.

Meeting people on the internet can be a challenge. . . . I find it easier in some ways, namely, that there can be as little element of prejudice as possible. Using the Internet, is it possible that we can remove all pre-judgment of perception?

Would removing all prejudice (both conscious and unconscious) even be a good context for meeting people? Or do judging people immediately (irl) protect us from the creepy old men.



Anyway, it is always interesting to discuss online friendships.

What can be gained from meeting people through online forums, games, chats, etc.?

hip hop hypocrites

Ah yeah, dear old hiphocrisy,
First dude I've heard use the explicit phrase, is right here.
But it is just a phrase for the same idea that other rappers have been spittin out. don't even neeed to call out the big names. Just the bullshit politics and hipocracy.

Sunday, November 1, 2009

splash page = bad

I have been interested in the idea of making the homepage immediately part of the game. New players would be taken directly to a sort of "Join the fight!" rah and "Click here to do this" crash tutorial. Returning players would be given game updates, personal news, new form/chat without having to log in.

For any players, I would have a quick "about this" message/SEO/ keyword section..but for a lot of games I think new people visiting the game want to be shown what it is.

Players might not get over the initial disappointment (mostly,need to build up trust right away).

Try to give new people seeing your game for the first time an honest impression of your game. That is, I wouldn't use a much better graphic and kickass appeal if

They don't necessarily want or need to be taken immediately into a detailed description of the game setting. Instead, show them what is currently going on in the game world. What are people/agents doing right now? What is the big forum event that everyone is talking about? Yes, I'm sure you have a great history of the game world and story you want to cram down my throat, but I will get to the details when I am good and ready!