Wednesday, September 24, 2008

Can a computer think?

As far as I know, computers can only be as smart as humans make them. We can program them to "think," as we have when creating a super computer that can beat the best of chess players. However, if you ask a chess playing programmed computer to do math, it will be unable to compute it if it does not have the right software.

Even computer AI characters don't think in the common sense. They are programmed to do certain actions under certain situations. By no means is this reason; it's all in the code. The code however can mimic thinking so that from the user's perspective, it looks as though the AI character is thinking.


Why is this important? Well, considering that I'm making a game (based off the lego labyrinth), I will eventually have to create AI characters. Luckily, I'm using a program called Virtools that allows me to use various scripts to create characters, so I don't need to code from scratch (I only know basic Java, HTML, and a little bit of C++).

Simulating human thinking can be tricky though since no human is ever completely correct. Sometimes, even the best thinkers make mistakes. However, what level of mistakes is considered human-like? Make a computer character do too many mistakes and the player will think the AI is flawed. Make a character be too smart and the game will become impossible. I guess the only way I'll be able to find the balance is by simple trial and error, which is also time consuming.

Gah, too much thinking, I'm only human.

5 comments:

Jeffrey Miao said...

Technically, a computer is only capable of doing math. At the most basic level, a computer is only capable of boolean operations. The illusion of thought comes from a modular array of logic nodes that we can map into a programmable processor core. But let's not get silly ;)

Speaking of nodes, those will be your friend if ever you need to program AI. I know you've learned a little Maya, though I'm not sure how familiar you are with the hypershade tool.

Think of a node as an object (a la Java or your coding language of choice) which accepts certain scalar, vector, or array inputs, performs an operation then returns an output. The trick is to break down behaviors and reactions to a network of simple decisions based on a few situational inputs. You have plenty of opportunity to cheat, since you don't have to handle things like 'look left' or 'look right' because it's easier for the computer to scan an array of positions in front of it sequentially and very very quickly.

That's how squad tactics were achieved in Half-Life and FEAR, and is also the basis behind all the procedural crap in Spore. If you have access to XSI7 and Softimage's new ICE stuff, that stuff is absolutely wicked for anything procedural. And as a bonus, it's java-based and exports to obj.

The human AI in FEAR was very good, but since they don't really throw any other enemies at you, they get really predictable half-way through the game. Learning mechanisms are still only vaguely understood. Human error is usually the result of individual psychology or negligence (which you can simulate by sporadically introducing noise to your nodes). As for psychology... well, grunts don't have personalities. Or mothers.

Richard R. said...

@Jeffrey Miao:

True, a computer breaks everything down into 1s and 0s. So in essence, all a computer can do is math. So maybe using math as an example in my post was not the brightest idea. Hell, I am human. ;)

I'm learning how to work with scripts and nodes in Virtools (and Maya) right now. Thankfully they have pre-rendered code, so I don't need to do the grunt work myself. However, this does mean that my AI will be a bit predictable. Eventually I hope to figure out how to code things myself.

Personalities though? Geez, let's not get crazy now. lol. I'll be happy if I can figure out how to make good level design using Maya and Virtools. Thank goodness for grunts.

oakleyses said...

burberry outlet, polo ralph lauren outlet, michael kors outlet, kate spade handbags, coach purses, louis vuitton, louboutin outlet, michael kors outlet, louis vuitton outlet, michael kors outlet, ray ban sunglasses, nike free, michael kors outlet, polo ralph lauren outlet, air max, tory burch outlet, christian louboutin shoes, tiffany and co, coach outlet store online, longchamp handbags, coach factory outlet, louboutin, coach outlet, longchamp handbags, nike shoes, prada handbags, oakley sunglasses, oakley sunglasses cheap, louboutin shoes, kate spade outlet, michael kors outlet, prada outlet, ray ban sunglasses, tiffany and co, air max, oakley sunglasses, louis vuitton outlet, chanel handbags, jordan shoes, gucci outlet, burberry outlet, michael kors outlet, louis vuitton handbags, louis vuitton outlet stores, longchamp outlet

oakleyses said...

nike huarache, ugg, valentino shoes, insanity workout, mac cosmetics, asics running shoes, herve leger, babyliss pro, nike roshe run, uggs outlet, abercrombie and fitch, vans shoes, instyler, jimmy choo outlet, ferragamo shoes, ugg boots, wedding dresses, beats by dre, nfl jerseys, north face jackets, ugg pas cher, celine handbags, abercrombie and fitch, new balance shoes, soccer shoes, nike trainers, longchamp, chi flat iron, hollister, marc jacobs, north face outlet, reebok outlet, nike roshe, barbour, bottega veneta, p90x, giuseppe zanotti, lululemon outlet, birkin bag, mcm handbags, soccer jerseys, rolex watches, mont blanc, ugg australia, ghd

oakleyses said...

wedding dresses, moncler, juicy couture outlet, toms shoes, oakley, canada goose jackets, canada goose uk, converse shoes, moncler outlet, ugg, lancel, air max, converse, moncler, hollister, timberland boots, ugg boots, montre homme, gucci, juicy couture outlet, moncler, air max, baseball bats, louboutin, coach outlet store online, parajumpers, canada goose, ralph lauren, vans, canada goose, canada goose outlet, louis vuitton, canada goose, hollister, moncler, karen millen, canada goose, iphone 6 cases, supra shoes, moncler, ray ban, hollister clothing store, rolex watches, moncler, ugg, canada goose