AI Follies: Behaviors

By Shamus Posted Tuesday Aug 25, 2009

Filed under: Programming 32 comments

“Behaviors” is my catch-all for the complexities of having the AI do different things in different situations. This might be group-level stuff, like:

  1. Deciding to spread out to reduce vulnerability to grenade attacks.
  2. Regroup, because the team is getting picked apart.
  3. Fortify, because there is some central goal that needs to be defended above and beyond the lives of the team members.
  4. Flank, because a couple of members have the player pinned down.
  5. Rush, because the battle has reached a boring stalemate and a banzai charge should shake up the complacent player.

Behaviors also refers to the individual decisions being made, like when to retreat, call for backup, rush, or defend. Which weapon to use, and when to throw a grenade. It always feels like just “fixing” one situation will make the AI more robust, but often adding onto the logic will simply move the failure around rather than eliminate it. The perfect example is detailed in this old post, where I talk about the difficulty of having the AI react reasonably to a fallen comrade. Right now, most games have the AI spot a body and immediately assume they have just come upon a murder scene. This is true even if they’re ten meters away and the victim is apparently resting peacefully in their bed. It turns out that in trying to fix this you can end up chasing your tail quite a bit. You could write all sorts of code, add special cases, and record lots more dialog to give the AI many different modes of behavior, and in the end you’ll still have lots of cases where the AI makes a complete ass of itself.

What to do when a door is suddenly open? When objects are missing? When a tank of flammable stuff is ignited in a huge fireball? (Hint: Explosions do not imbue the people just outside of the blast radius with magic psychic powers to know the exact location of the person who initiated the explosion.)

This is where the real cost of AI comes from: It’s complex and time consuming to test. As your system grows, you’ll spend more time running scenarios and simulations and less time actually writing code. Perhaps the programmer will see some bad behavior. Perhaps the AI seems too cautious and doesn’t move often enough in combat. But why? Is the AI engaged in the wrong behavior, and defending when he should be moving? Is The “group AI” out of whack and the group isn’t receiving orders? Or is the pathing hosed and the AI can’t figure out how to get there? Or does the pathing work but the AI is under-valuing certain locations? Or is the AI over-estimating the danger involved in moving? Or is the AI caught between a couple of conflicting behaviors? (Example: Hey, I’m behind cover, but I need to move. I’ll move from A to B. 1/60th of a second later: Hey look! Point A is really a lot closer than B! Why don’t I go there instead? In fact, I’m there already! What luck!) Bugs are thus hard to spot amongst the noise, and hard to tell from design flaws. And even when you do spot them, it’s hard to identify the cause. And hard to fix without simply breaking something else. And the better your AI gets, the worse all of these forces will be.

Despite my doom and gloom, I’m actually encouraged at how AI has been improving a bit over the last few years. Black & White got my hopes up a few years ago. I heard about its complex behaviors and activities before release, and I think I imagined that we’d hit some sort of breakthrough with AI, similar to what BSP’s did for graphics in the early 90’s. The reality of the game didn’t nearly live up to my imagination, and I think it was a sobering moment for everyone trying to move AI forward. It was possible to spend huge amounts of time and energy on AI and wind up with something that often felt like an accident when it did something right, was infuriating when it went wrong, and very often wasn’t all that different from a system built on simple rules and randomness.

We haven’t gotten a huge leap forward, but we are seeing gradual progress. Still, I don’t think we need to worry about Skynet anytime soon.

 


 

Stolen Pixels #119: After Curfew

By Shamus Posted Tuesday Aug 25, 2009

Filed under: Column 34 comments

Took me a little while to realize why I was making a “Tonight Show” styled comic starring Dr. Breen. It wasn’t until I was done that I realized I still had the movie Funny People in my head and thus had an itch to write (bad) stand-up comedy. You can see the result here. In fact, you should go do that now. You just passed up two links to the comic. This one is your last chance! You missed it again? Hmph. Your loss.

Of course, stand-up comedy is actually really inappropriate for a comic strip format. The segues and set-ups and banter eat up lots of words but not much time. Except, in a comic, words are time. A five-minute routine would fill a graphic novel if you really tried to adapt it and not just cram a paragraph of text into a balloon next to a smiling head. (Which is sort of what I did today.) While making this I realized just how much the audience reaction is part of the routine. (Hence the faux-closed-captioning. It just felt like he was by himself without it.)

This is the first time I had to make a map for one of my comics. I just didn’t have anything that could pass for a stage, so I made a little box theater and a red curtain using the Source Engine tools. Once the comic was done I kept going. And going. Six hours later I had the makings of a TV studio set:

Continue reading ⟩⟩ “Stolen Pixels #119: After Curfew”

 


 

Velvet Assassin: Bargain Bin

By Shamus Posted Monday Aug 24, 2009

Filed under: Pictures 49 comments

Remember the time I picked up STALKER for $3.75? Well, here is a nice birthday present:

velvet_price.jpg

Velvet Assassin for $6.24. I picked it up at the same Target where I got STALKER. Hmmm. This is starting to look fishy.

I’m starting to wonder what is going on here. Have I stumbled on some sort of low-level scam? Similarities:

  1. In both cases it was a “new-ish” game. Everywhere else it was still selling for full price, or perhaps had $10 knocked off. Yet here I find it for some ridiculously low price, lower than even bargain-bin shovelware that’s been on the shelves for years. More importantly, I think this is well below the turn-in value offered by GameStop. (Although GameStop doesn’t take PC games in trade.)
  2. Three mark-down stickers.
  3. The game is placed in some odd location. STALKER was several aisles away, mixed in with headphones and such. Velvet Assassin was mixed in with the crappy kids titles.
  4. PC Titles.
  5. The price is screwy. It’s $3.75 instead of $3.99. $6.24 instead of $6.99. Retailers don’t usually price things this way. I was able to peel back the stickers and see the previous prices were $1X.X6 (slightly unreadable) and $34.98.

I’m wondering if an employee has some sort of scam going where they will “accidentally” mark something way, way down. Then they place it in an out-of-the-way spot where it’s unlikely to be noticed by a real gamer shopping for games. Later, an accomplice comes in and buys the game. The delay would make it hard to link the rogue markdowns to a specific employee.

Perhaps the scammer will peel off the discount stickers and return the game unopened (perhaps even to another store) for full price. (Which would likely be in store credit, but still.) Or maybe they just keep it.

Or maybe it’s all just a harmless mistake.

Or maybe Target once in a while decides to get rid of a game in a hurry, and marks it down to next to nothing. Strange.

I hadn’t really planned on getting this one. Good stealth gameplay is really fun, but bad stealth gameplay is agony. Having graduated from the Thief University of Knocking People on the Head, I have really high standards for that sort of gameplay. I don’t mind playing the “so bad it’s funny” game once in a while for the sake of a comic, but I was worried this would fall into the “so bad it’s joyless and aggravating”.

I guess we’ll find out. I have to finish up my AI series first. Then the series on The Path. Then the series on procedural stuff.

 


 

YouTube Infringement

By Shamus Posted Monday Aug 24, 2009

Filed under: Rants 57 comments

The “copyright dispute” system in YouTube is pathetic. Remember my Reset Button video?


Link (YouTube)

Someone claimed I was using their “copyrighted material”. That’s pretty hard to believe, since I made the content myself. There are a few still images used in there, but they’re from promotional materials from Nintendo, Sony, etc. and they fall easily under fair use. But someone from the Japanese YouTube channel eb!TV claimed that some unspecified portion of my video infringed on their content. Now they get a free link from the video’s page, which accuses me of stealing content. Also, ads now run over the bottom of my video.

I disputed the claim, but now I have to wait for a response from the accuser. I don’t think he has much incentive to get back to me in a hurry, since the longer he takes the longer his ad sits on my page for free. This entire system is preposterous. I’m not crazy about the guilty-until-you-can-prove-yourself-innocent attitude of it, although I guess that’s necessary on YouTube’s part because they don’t want to end up mediating a bunch of disputes. However, the system of giving a free link to the accuser and then making the accused fight to get rid of it is a nasty one, since it sets up incentives for people to game or abuse the system in order to increase traffic. The fact that the accuser doesn’t even need to make specific claims is even worse, since they can make drive-by blanket accusations claiming that “some unspecified portion of your ten-minute video is taken from us” and then leave all the legwork to the accused to figure out what part they might be talking about and address it specifically.

This sucks. I can’t stand that eb!TV gets a link and a finger in my eye every time someone visits the page. (The accusation the “this uses content from eb!TV” bothers me more than the link itself.) I’ve scanned through their archives. The only thing I could find is this Mirror’s Edge video, which is a lame-ass shot of the game taken from a camcorder aimed at a TV. The thumbnail view of their video looks like the opening of mine, except mine was taken directly from the game and not that amateur-hour setup they have going there. But all Mirror’s Edge footage looks more or less the same. Is that the basis of their claim? That I somehow swiped the crappy TV footage and magically turned it into my nice, clean direct-feed footage? Or is it something else? How am I supposed to defend myself against this sort of nonsense?

Do I take my video down? It’s only got 28k views, which is pretty small. Having said that, doing so will hurt me (my hard work gone) more than it hurts my accuser. (Who will lose the tiny trickle of traffic I bring them, perhaps a visit a day or something similarly meaningless.) It doesn’t help that the accuser is Japanese, and thus operating under an entirely different language and set of IP laws.

A system where you’re guilty and punished until you can prove yourself innocent against lazily vague claims (the details of which have never even been shown to me) of infringement with no cost or penalty to the accuser – even if they are proven wrong – is unjust and unhealthy. eb!TV should have been required to not only cite what portion of my video infringed, but also where I supposedly took the content from. That can still be faked, but at least it would require the accuser to commit an act of deliberate deception rather than just fire off an email and get free advertising at my expense.

As it stands, I could do a bunch of legwork, harangue YouTube for details, and maybe win the fight and get the video cleared, and all that will happen is that my video will return to normal. Adding to the injustice is that fact that drawing attention to the problem increases their benefit even more. Now lots of people will click on that link and view their channel.

Jerks.

 


 

Good weekend

By Shamus Posted Sunday Aug 23, 2009

Filed under: Personal 48 comments

My wife has her birthday on the 20th and mine is on the 24th, so we usually celebrate them together. On Saturday we had our birthday date.

We went to see Funny People. I’m one of those hated people who actually enjoys the standard-issue Adam Sandler movie where he stumbles around, babbling like an ignoramus. But Funny People mixed this up by having Sandler play an actor who was typecast as a babbling ignoramus. Somewhere down that particular hall of mirrors was a charming film with solid laughs that was a bit overlong. The ending worked, and we left the theater thoughtful and talking about the characters rather than re-hashing the jokes in search of our favorites. Unexpected.

Then it was to Red Lobster. I usually tell people, “I don’t eat seafood 300 miles inland”. But we were in the mood. Today’s catch: FRIED BREADING. What luck! That’s my favorite kind of fish!

After that was home, where we fired up Netflix and I watched The IT Crowd for the first time. Good stuff. I’m not prepared to embrace it as the next Red Dwarf, but it was fun.

Then Left 4 Dead. Incidentally, if you play Left 4 Dead on the Twenty Sided server from time to time, then you might want to download Death Aboard, and / or Dam It!, which are user-made campaigns which have been added to the server. Not quite up to Valve level quality, but they’re still fun and a nice change of pace.

Tomorrow I turn 38. Today is the last day I can tell people “I’m not old”, in the Dennis the Peasant voice. So, I guess tomorrow I turn old.

Bah. I’ve had worse.

 


 

How Differential Gear Works

By Shamus Posted Saturday Aug 22, 2009

Filed under: Movies 44 comments

How can a single drive shaft turn two wheels at different rates? I knew what a differential did, but I couldn’t picture how. This movie gives a great visual illustration of the problem and the solution.

Skip to the two minute mark to get to the good part.


Link (YouTube)

Of course, a differential is a long understood technology, but it’s beautifully elegant and seeing it revealed in its simplicity is a lot of fun.

 


 

Experienced Points#29 – The Future is Procedural

By Shamus Posted Friday Aug 21, 2009

Filed under: Column 24 comments

For me, one of the most exciting games this year has been FUEL. I haven’t written about it yet, but I have a series coming at some point. (Most likely after the AI series and my series on The Path.) I want to pick apart the procedural methods used and compare it to some work I’ve done in the past. The technology is really exciting to a procedural content fetishist like myself. This week’s Experienced Points is a very brief analysis of the technology and some ideas on where I hope this tech is headed.