Jump to content

Recommended Posts

if cleaning means oblitrating rubbish and people then yes

well to aliens we are just trash sooooooo I guess we agree then :P

oh and actually on topic I agree with parts of what shrelock said like when he said they should be organized for base defense but not for crash site because they would be shell shocked for crash site and would organize for base attack but that still leaves the difficulty of the actual coding.

Link to comment
Share on other sites

Just a note on "learning AIs". They can be exploited so hilariously that it's not even funny. Even moreso than scripted "gap-in-the-wall" AIs. It's also a crapton of work to code a learning AI, because the AI needs to understand what is good and what is bad somehow, and value its decisions. I much prefer scripted, but fuzzy-logic type AIs for RTS play.

For some more insight into AI-programming, I'd happily refer you over to Chris Park, the head of Arcen Games: Designing Emergent AI: Part 1

Link to comment
Share on other sites

Just a note on "learning AIs". They can be exploited so hilariously that it's not even funny. Even moreso than scripted "gap-in-the-wall" AIs. It's also a crapton of work to code a learning AI, because the AI needs to understand what is good and what is bad somehow, and value its decisions. I much prefer scripted, but fuzzy-logic type AIs for RTS play.

For some more insight into AI-programming, I'd happily refer you over to Chris Park, the head of Arcen Games: Designing Emergent AI: Part 1

Thank you for the link. It is a very interesting approach to gaming AI and makes a bit of sense. One of the things that I really like about it is that it operates in a fashion that is limited in its knowledge. This is really an area of interest to me currently because in our research we are currently focused on building a theory of live organism behavior that can model their behavior. Although we have succeeded in getting it to behave similarly to live organisms, we are using it in such an artificial environment that I am hoping to branch out in more complex environments to see if it can behave intelligently.

Link to comment
Share on other sites

To add to what I said earlier Chris Park's method of building the AI highly reminds me of Brooks AI robotics work (especially his paper in 1991 "Intelligence without Representation") that essentially has the emergent behavior of the system built as a set of inputs from single process functions that work independently of one another for the most part, but affect the overall behavior. It seems like the most common AIs typically used in gaming rely on a more 'cognitive' approach of modelling everything and then making 'logical' decisions. Although I find it disappointing Chris Parks AI doesn't include much in the way of learning there are definitely merits to his simplified AI approach.

By the way Moonshine, do you know much about gaming AI in general? If possible I would like to discuss some of the approaches my lab has been taking to artificial life and to write something of a proposal up for an AI gaming model based on it.

Link to comment
Share on other sites

Chris decided against a learning AI for a few reasons. One being the excessive space required for the AI's learning database, another being that a learning AI either have to be flawed, or is destined to become flawless, leading to a very non-fun game. Instead his idea was to design an AI that could "look" at any given situation and act "intelligently" with the current state of the board. Kind of like how chess-masters can play against 40 simultaneous opponents. They can't possibly remember every game, so instead they analyze the board when they see it and act upon it. This, coupled with his decentralized swarm intelligence (every ship having its own intelligence), makes for a very interesting opponent to play against.

I've played a lot of AI: War and the AI is really something extra. It can do some excessively devious things that a scripted AI would never "think" of, simply because it "made sense" at the time for the AI. It also very rarely falls prey to the "gap in the wall" exploit or rarely does something blatantly stupid. But it's not really "intelligent" as in that it "plans" anything or "learns". It simply analyzes the given state and acts upon it. You can have a situation where 200 ships enter your system 50 of them immediately get caught by the defenses, but the remaining 150 ships split up into three groups to simultaneously hit three different vital targets in the system. One group encounters heavy resistance from your defensive fleet and decides to withdraw. The other two groups successfully accomplishes their goal and leaves the system. The AI did not defeat you. It did not "win" the game. But it did harm you. Severely. This behaviour is not scripted, but decided "on the fly" by the midlevel local commander. (Strategic AI -> Local commander -> Ship swarm AI). I've also ha cases where the AI completely avoided my defenses and hit me where I was weakest simply because it was the "path of least resistance". It was a case of me having absolutely gargantuan defenses on my home planet, but not a single tachyon detector (detects cloaked ships), so the AI hit me with EyeBots, a small very mobile cloaked ships that can pass through forcefields. Me, as a human player, had not even considered that approach, and before I understood what was going on, 400 Eyebots where tearing a hole through my command station and I lost only seconds after. I sat there gaping at my screen. Never before has a game "outsmarted" me so much as AI:War. Usually you get ROFLstomped by an RTS AI simply because it macros (plays the overarching economy game) better than you.

I'm not sure this type of AI would even work for a game such as Xenonauts, but to me it's a fascinating experiment, and a blast to play against. I just wish I had more time to sink into AI: War :P

As far as your question goes, no I'm not really into programming AIs at all, even though AIs as a concept intrigue me and I do read a lot. There's also the distinction between gaming "AI" and a real AI. One must have a goal with what the AI is supposed to accomplish, otherwise one is fumbling in the dark. In Chris' case it was simple: His AI had to be able to play AI: War "intelligently".

Link to comment
Share on other sites

@Quartermaster, it's ok. I know about a few good papers of people who are trying to learn planning operators by figuring changes in the environment (state transitions). Just PM me if you're interested in some pointers.

An interesting read, now that I had the time. It's somewhat similar to Chris' approach in AI:War with one "squad commander" (that is invisible), yet individual "intelligence".

That's the point. Actually, the concept is pretty straightforward. Rather than programming by hand the whole control of the NPC's what you need to do is to program the atomic pieces of behavior (animations for shooting, walking, opening a door) and making appropiate calls to the game engine to set position, invoke fire resolution, etc.

The planner - which is basically the same algorithm used for pathfinding, but rather than searching on the navigation graph, searches in a implicitly defined state and action graph - figures out what's the sequence of actions to attain the goal. You execute one action at a time, very much like you set running a FSM. When the action terminates - if the NPC is still alive of course - you check that the conditions for executing the next action still hold in the present game state. If so, you invoke the next low-level action. Otherwise, you get a new plan, which can be executed in the current conditions.

It's also nice you can coordinate with other team-mates.

The tricky part is what goals do you need to define, and what mechanism uses the NPC to select his goal. In the case of Xenonauts, I don't see it to be much of a problem, given how limited would be the aliens intentions (i.e. killing all human soldiers) and actions. Basic goals such as Scout Point/Area, Guard/Ambush and Kill would cover most of the bases for the most part of Xenonauts tactical missions.

To put an example:

1. Aliens start without seeing any enemy. Then, a Scout goal - selecting some point or area in a clever way - is selected.

2. You make a random roll - or depending on the NPC state - to decide the stance Cautious or Gung-Ho. If the former is selected, then you only consider actions that take the NPC from cover to cover in the direction of the location to scout. Otherwise, you consider all possible move actions.

3. A plan consisting of pairs of Move To Tile, Look Around actions is computed.

4. These are executed. At each game tick, you check for conditions that might require the plan to be re-computed. Say the alien, after executing a Look Around locates a human squaddie.

5. Goals are re-evaluated and now a Kill goal is activated with the human squaddy as the target.

6. A random roll is made to select between Gung-Ho or Cautious. If Gung-Ho, then the Shoot Action can't be used unless the NPC is really close to the target. Otherwise, Shoot can only be done from cover and at long or mid range. Say the alien is cautious.

7. A plan consisting of actions Run to Covered Tile and Shoot At Target is computed.

8. The Shoot At Target action keeps executing until the target is dead (or the alien is out of ammo). Say he runs out of ammo.

9. This triggers a plan recomputation. Now the planner figures out that the only action capable of killing the target is Unarmed Attack, so a plan consisting of various Run To Tile actions and a Unarmed Attack action is computed. Some procedure could decide whether he has good chances of killing the target with a Unarmed Attack, and then select a Flee goal (or whatever our imagination and programming resources allow).

10. Either the alien is shoot down on his way to the target or he gets to an adjacent tile for his Unarmed Attack.

11. Unarmed attack keeps being executed until the target is down or the NPC is dead.

It's a very flexible framework, in my opinion, that can generate credible behavior on NPC's.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...