• About
    • ingZ, Inc
    • Gameplay & Rules
    • Traveller Pen & Paper RPG
  • Media
    • Screenshots
    • Videos
  • Features
    • Portal View
    • Nav-Wheel
    • Mobile MMORPG
    • HexMode
    • Augmented Reality
  • Story
    • Ship’s Library
    • Background
    • Characters
    • Starships
    • Galaxy Map
  • Community
    • Developer’s Blog
    • Discussion Forum
    • Facebook
    • Twitter
Download the Beta
Home Traveller-AR Discussion Forum

Essential AI Reading | Gameplay Suggestions | Discussion Forum

  • Tweet
  • Tweet
 
You must be logged in to post Login Register


Register? | Lost Your Password?

Search
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Home Discussion Forum Gameplay Suggestions Essential AI Reading

Essential AI Reading

Print this Topic
Page:   1  
Post
Admin

Harlan Beverly

posts 120

3:36 pm April 27, 2011

Print this Post
9

I like the collision detection routine actually!  Its very similar to what I implemented… (except taking into account 3D space, and the very large size of planets).  [e.g. a planet is described not just as a "point" but as a point with a very large radius].  Fortunately there is a nice little shortcut that I used to deal with this:  

Using the Law of Cosines; http://en.wikipedia.org/wiki/L…..of_cosines 

I can calculate that my trajectory may or may not intercept the area of the sphere, using only the radius of the sphere as the comparison.  [hint: I use the right triangle created by my trajectory line with the line on my trajectory that intersects the center of the sphere].  Cool math, and only 2 arc-cosines to calculate.

———————

Harlan Beverly is an Ingz, Inc. employee (makers of the game Traveller AR).

Veteran of Traveller War

jjaquinta

Boston, MA

posts 205

8:02 pm April 26, 2011

Print this Post
8

SHIP BEHAVIOR: NON-COMBATANT

This type of ship follows a "prey" model. This would be merchants, scouts, and general civilians. In general they just want to get away. Taking inspiration from the Wikipedia article on Antipredator Adaption I would suggest a few techniques.

Avoiding Detection. The Imperium requires ships to broadcast transponder signals at all times. That makes it kind of hard to be completely invisible. However keeping the energy signature of the power plant to a minimum, or not using active scan, would draw less attention to a ship. It more depends on how, in the game, you do ship detection. Whatever it is, work out what actions a ship can take to subvert it, and that's the strategy.

Avoiding Attack. This involves trying to prove that you aren't worth attacking. Bascially that the effort required to subdue the ship exceedes the reward for doing so. This can go two ways.
A ship can try to convince them that the effort is too high. It may, for example, broadcast a (possibly inflated) list of its armaments in hopes that it is more than the attacker was expecting, or do a little spin about to show how maneuverable or agile the ship is, or broadcast how connected they are with the local mafia/navy/nobility  and that if they mess with them a contract will be taken out on them.
To convince an attacker the reward is too low, they my broadcast a (possibly deflated) manifest of what they are carrying. Or, if they think that they are going for a ransom, the low class status of their passengers, the negative balance of their bank account, etc.

Avoiding Capture. Several strategies here. Ships might specialize in good scanners and maneuver drives instead of armaments. These "skittish" ships would have a low threat threshold; if they detect another suspect ship moving towards them they immediately move away pre-emptively.
Merchant ships plying certain routes can "herd" into convoys. Moving collectively gives them many more guns with which to deter other single ships from attacking any one of them. These may sync up with Naval patrols to and from the jump points for additional protection. (I use this as a plot device in two of my novels!)
Alternatively, a "herd" of ships could choose to scatter when attacked, leaving the attacking ship to only choose a single, small target. Sucks to be them, but the group, in general, does better. Even better if the "lame duck" left behind is actually a disguised Navy vessel.

Avoiding Consumption. Once a ship has been immobilized, there are still tactics it can use to mitigate the damage.
If it's got rock-solid armor, or lots of interior bulkheads with all the outer surfaces comprised of fuel tanks, it can buy time while the attacker has to blast its way in. Or, it can jettison its cargo (al la Elite). If that's what the attacker was going for it now has to slow down and pick it all up rather than blow the carrier up. A variant of that is to "surrender with terms". If the pursuer promises no further violence, the ship will heave to and cooperate in the transfer of the cargo and/or passengers. They write it off as an insurance loss, and prevent further damage.
Another last resort is offering ransom. Missiles and repairs are expensive for both sides. If an attacker can demonstrate clear superiority, it is a fair resolution for the defender to offer to wire over a chunk of "protection money" in return for being unharassed. As with handing over cargo, there has to be some basis of trust. How exactly you track the repuation of people who turn against the law is going to be very specific to the game. But if there is a way they can firmly identify with a specific clan or group, and there are repercussions to breaking your word, it can work.

All together, each of the above strategies can be taken as a spectrum that a ship could run through in the course of an attack. Or, ships can be design to be particularly good one one or more of them, and favor that tactic.

Veteran of Traveller War

jjaquinta

Boston, MA

posts 205

5:58 pm April 26, 2011

Print this Post
7

OK, so, since you are bent on collision detection, lets do that.

What I suggest using is based on a mariner's rule used for working out if you are on a collision course. In a boat, if you see a another ship that you think might be a concern you take a bearing. I.e. what degree of the compass it appears at. Wait for a bit, then take another bearing. If the bearing is the same, and the ship looks visibly closer, then you are on a collision course with it.

So, for your 3D game, lets assume that each ship periodically does a "radar sweep", that gives them the coordinates of the other ships in the vicinity. First you come up with a 'danger zone', say, approximately, 3 times the distance the fastest ship in sight moves at. For each ship in the danger zone calculate a "bearing" for it by normalizing the relative distance vector. E.g. if s0 = your ship's position, and s1 = the other ship's position:

  bearing = (s1 – s0) [vector subtraction]

  bearing /= mag(bearing) [scalar vector division by the magnitude of the vector]

Store that value. After the next radar sweep, calculate the bearing again. Compare it with the last bearing. If it's less than a certain value, sound the collision alert!

  if mag(bearing_old – bearing_new) < epsilon then CollisionAlert()

 

Alternatively, if it's not practical to store the bearings from radar sweep to radar sweep, if your "radar" also tells you the velocity, you can create s1 for calculation purposes as s0 + v.

Does that work for you?

Admin

Harlan Beverly

posts 120

10:10 am April 26, 2011

Print this Post
6

Wow, great reading for me this morning!  Thanks for helping to inspire us here in AI development land.  I think it's probably worth adding a few thoughts that reading both jjaquinta and Flatfingers has inspired me:

1. jjaquinta's ideas of role-based "passive" behaviour is definately the right direction. local ships is definitely something I am working on because we want "politics" of various factions + races to play a big part in NPC's attack/defend/feel logic.

2. Flatfingers tactics vs. strategy is also right on.  I see it the same way, the tactic of a ship is based on it's type and it's "mood", as well as its opponent, and the landscape (e.g. nearby planets/asteroids, starbases, etc.).  the strategy of a faction or a group of ships is more complex and is a "guiding coordinating principle" behind an objective.  I'm doing this by giving ships a tactic, creating groups of ships that follow a commander, and giving commanders the ability to over-ride the tactics of an individual ship and set the course for that ship based on the strategy.   All this is being coded right now, as I've only just finished the "passive" behaviours, and now moving on to active behaviours.

 

3. RE: Coordinate systems/ NPC Movement, there are very few shortcuts I can implement right now.  it may be possible to use hash tables, and more later, but for now, I'm doing everything by the numbers.  I do have a few "3D vs 2D" shortcuts, I can't tell you about yet… but in general, the math is the math.  I have to do it this way, because our huge variety of ships, ships speeds, random objects in space, moving objects in space, etc… and my desire to make ships behave "as close to players as possible".. means I can't take shortcuts.  (at least not until we are solidified on all the ship types and objects, etc… even then, shortcut code may not be worth it, as server capacity is a non-issue).

 

Hope this continues to give insight, and very much appreciate the thoughts and feedback!  You guys are inspiring for sure!  (now go tell your friends you are helping design a game, and spread the word!)

———————

Harlan Beverly is an Ingz, Inc. employee (makers of the game Traveller AR).

Veteran of Traveller War

jjaquinta

Boston, MA

posts 205

10:03 pm April 25, 2011

Print this Post
5

Ship Roles

The AI I've done for this sort of thing has been pretty primitive. But the starting point may help you. The way ships operate largely depends on their role. It comes down to what are the ways of making money in your universe? Whatever they are, there should be ships doing that.
The other point to consider is how you manage your ships. Are you going to create all possible NPCs and then track their behavior? Or are you going to generate them as there are people in places. The latter is more efficient at the start, but it eventually becomes the former as your player density increases, so you might start with that.
In most cases I had a "library" ships of different classes. The base algorithms would generate the tonnage necessary to fulfil the "need", and then pull ships out of the library randomly to fulfill that tonnage.

Some classifications:

*Merchant Ships. For every pair of destination points in my game I would calculate a hash. This would then feed a pseudo random number generator. Based on how good the trading prospects were between the two worlds, it would generate a range to determine how much tonnage of ships were plying the path between the two worlds. The ships would be placed randomly in dock, along the route from main world 1 to the jump point of system 1,  in jump space, along the route from jump point of system 2, in dock in system 2, and along the reverse. Goods contained would be whatever is hot to sell going to and from those two worlds. If there was a cost effectively placed gas giant, detours to and/or from it for refueling would also add color for appropriately equipped ships.

*Insystem Shuttles. Much like merchant ships, but for every two worlds of interest in the system less than 30 days travel apart, a hash would be generated and ships placed in a similar manner.

*Navy Patrol Ships. Patrol boats would be computed the same way. Given the richness of the port, a certain number would be created. Jump capable ones would patrol from one system to the destination system and back. Non-jump capable would patrol to and from the jump point.

*Local ships. Depending on the mainworld government type, these would patrol the insystem routes.

*Scouts. XBoats go along X-Boat routes. Normal survey vessels go along the worlds not of interest.

*Pirates. These behave the same as Merchants. If an opportunity arises where they outgun a nearby ship, and there aren't patrol vessels around, they jump them. Actually, I think I didn't bother generating pirates, I just detected "ideal conditions" and gave normally generated merchants the chance of "flipping the counter" and becoming pirates.

*General Navy. Never got this far. But they were going to be deployed on a sector wide level, moving strategically depending on the ongoing background history.

Veteran of Traveller War

Flatfingers

posts 107

7:35 pm April 25, 2011

Print this Post
4

Post edited 7:46 pm – April 25, 2011 by Flatfingers


Another novel, coming right up! Laugh

 

A. NPC Combat Tactics
  1. "Tactics" != "Strategy"

One things I enjoy discussing is the point that tactics are about the exploitation of local environmental phenomena for short-term advantage. This is very different from strategy, which is about planning for large-scale operations over a long period of time with logistics playing a signficant role. (http://flatfingers-theory.blog…..ctics.html) This distinction is worth making because it means that focusing on real tactical gameplay makes it possible to create real strategic gameplay as well, which confusing the two doesn't permit.

I'd love for NPC tactics to be generated dynamically to support the larger strategic objectives of the faction to which each NPC belongs (if any). A lone Aslan ship might behave aggressively if it's gone rogue, but it might bug out quickly if it's a recon ship for an ihatei fleet.

  2. Rich Environment

At an absolute minimum, "tactics" should mean more than just spamming the F3 key to apply a character's magic power on a cooldown timer. It should be more than "buffs/debuffs"; it should be more than cloning the tank/DPS/healer convention so that combat is really no more than an abstract game of "aggro management."

This requires space to be full of "stuff." The local environment of a tactical encounter needs to be rich enough in distinctively different phenomena to allow ships to use those phenomena for offensive or defensive benefits. (It would also give value to the various types of sensors and sensor operations described in the Traveller universe.)

I've written a lot on this subject for a certain other MMORPG (http://flatfingers-theory.blog…..nline.html), so I won't belabor the point. Just please provide things in space that we can hide in and behind, and that have various effects on sensors so as to create "terrain" that can be used offensively and defensively.

  3. Solo and Group Tactics

Another area that's regularly ignored in space MMORPGs is combat AI for individual ships versus groups of ships. Individual ships can jink and hide and ration out shots versus firing an alpha strike, but what about calling for help and attacking from two sides and (as noted in today's dev blog) luring unsuspecting players into an ambush?

Multiple allied ships should present the appearance (if not the reality) of communicating with each other to execute a tactical plan led by a command ship within the group. In gameplay design terms, players in search of a challenge should be able to find it not just in going up against an "elite" ship that's only more powerful because it's larded with more weapons, but in encountering relatively small ships in groups. Such groups should be a real threat, but that threat should come from the power of coordinated actions, not just bigger numbers.

Oh, and it would be nice if the Traveller "Fleet Tactics" skill had some value in Traveller AR for both PC and NPC fleets. Heh. :) (That brings up the question of whether players will be able to band together in large-scale fleets as in guilds/corps from other MMORPGs, as well as in ad hoc groups. Different thread, perhaps.)

  4. Difficulty Level

To the actual point of today's dev blog, how do you design a Traveller MMORPG so that players can find an acceptable level of challenge? The conventional approach is to create a magical "level" number for player characters (or ships) and NPCs, and then define equally-magical "zones" containing NPCs whose levels fall within a range band.

I hope Traveller AR's designers can be a little more innovative than that! Not merely for the sake of innovation, but to avoid straying too far from the source IP.

In Traveller, there are some locations (such as Imperial depots) where you would reasonably expect some targets to be extremely challenging. But for the most part, anyone of any strength could show up anywhere, so that pretty much eliminates the notion of static zones with defined ranges of specific-level mobs. Instead, I suspect that Traveller AR will need to dynamically generate opponents based on the calculated strength of the player ship or grouped ships and their crews.

Anyone feel like taking a swing at what such a calculation might look like?

B. NPC Non-Combat Behaviors
  1. Agendas

Non-hostile NPCs should be more than window dressing if possible. That means they need to have goals, and they need to have a distinct palette of actions they can take that give the appearance of moving them toward achieving those goals.

  2. Factions

The notion of "faction" is woefully underused in today's MMORPGs. In a Traveller MMORPG it could be used to determine an NPC's individual goals, as well as to support a large-scale storyline.

C. NPC Local Movement

To discuss this in any useful way, don't we need to know more about how player ships will move? Specifically, will movement be real-time player piloting through open space (which might be appropriate for a handheld device), or point-and-click to dynamic waypoints in space (which might make more sense for a Traveller game)?

If player movement is from waypoint to waypoint, AND if it's fast enough that in-system objects are essentially in fixed positions, that could simplify NPC ship movement considerably. I imagine something like dynamically creating and updating four waypoints in space for each large space object: one ahead and one behind the direction of rotation around the system's primary star (in the plane of the system's average ecliptic), and two waypoints (in the same plane) at 90 degrees to the two other waypoints. In other words, if you were looking down on the whole star system from above or below, and focused on one object and its associated waypoints, you'd see four of them equally spaced around the object, each about one diameter of the object away from the object: one leading, one trailing, one closest to the primary and one farthest away.

The purpose of this would be to make maneuvering calculations easier. For transit to a space object, you'd plot a path from your current waypoint to the waypoint on the side of the object where you are relative to the primary star. For flying past a space object, you would create a list of waypoint to fly to in such a way as to minimize deviation from a straight line between your current waypoint and your target waypoint. By dynamically updating the position of all four of an object's waypoints to an absolute X, Y (relative to that star system) every time the position of the object itself is updated, you minimize the math that has to be done during path calculation.

If player movement is real-time through open space, then some variant on dynamic waypoints might still be possible. Create and update waypoints around space objects, but just make them invisible so that only NPC ships use them for maneuvering.

Obviously this only seems simple to me because I have no clue how Traveller AR is actually implementing this part of the game. :)

Any other thoughts on this?

Admin

Harlan Beverly

posts 120

1:38 pm April 25, 2011

Print this Post
3

Thanks for the fun reading links on AI!  Per you all's request, I've posted a Developers Blog about my own challenges with the AI programming:

http://www.traveller-ar.com/20…..traveller/

I've asked for comments/ideas to be posted here (in this thread) so we can keep the conversation going.

You all are amazingly awesome and helpful sources of ideas for me (so thanks!)

 

Surprised

———————

Harlan Beverly is an Ingz, Inc. employee (makers of the game Traveller AR).

Veteran of Traveller War

Flatfingers

posts 107

1:06 am April 15, 2011

Print this Post
2

I remember hearing about this over at Rock, Paper, Shotgun in a comment thread discussing Gratuitous Space Battles: http://www.rockpapershotgun.co…..-prattles/ . I'd been a fan of Doug Lenat's work since college, but somehow despite being interested in both AI and Traveller I'd never heard this story about Eurisko.

 

After some research, the most helpful link found was this one, which may be the one (or a copy of the one) you're thinking of: http://aliciapatterson.org/APF…..hnson.html

 

It also got mentioned a while back on the CotI board here: http://www.travellerrpg.com/Co…..php?t=3128 and here: http://www.travellerrpg.com/Co…..hp?t=15850 (the latter of which has some excellent additional information as well as some good old-fashioned "I coulda beaten it!" chest-thumping Laugh ).

 

Incidentally, Cycorp, the company that Lenat started in order to market Cyc, is headquartered in Austin. An interesting opportunity there…?

Veteran of Traveller War

jjaquinta

Boston, MA

posts 205

9:22 pm April 14, 2011

Print this Post
1

If you aren't already aware, you really need to read up on some Traveller lore. How an AI beat every single Traveller gamer at the national Trillion Credit Squadron competition in 1981 and 1982.

Eurisko was an generic AI program that it's author feed the rules to TCS to. It then followed those rules to build a fleet. To some degree it exploited loopholes in the rules. But they changed the rules after it won, and it still won the next year!

There's a pretty good article out there on the whole thing, but I can't seem to find it. It might be this one, but I've seen it for free. This blog has what might be a summary of that article.

Does anyone have a reference to the original article? I remember it going into more specifics of how the information was encoded and it iterated through fleet design.

In any event, it would be kind of interesting to open up Traveller AR's combat heuristics. If people would write them in terms that were pluggable, you could run something similar to TCS as a sort of as a side game. It could be "in game" by being a simulation where your design was run against other designs. The winners could be rewarded and their concepts later be incorporated into the game background.

No Tags
Page:   1  
Topic RSS
Search

About the Traveller AR Forum

Forum Timezone: America/Chicago

Most Users Ever Online: 37

Currently Online:
1 Guest

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 4
Forums: 18
Topics: 227
Posts: 1059

Membership:

There are 642 Members

There are 5 Admins
There are 3 Moderators

Top Posters:

jjaquinta – 205
Flatfingers – 107
Magnus von Thornwood – 69
Proteus Heaton – 61
gammamutant – 38
sirnarf – 36

Recent New Members: juvia, fiezza123, hagalaz0271, travent, jeniffer, PHUONGNGUYEN1301

Administrators: Harlan Beverly (120 Posts), owhitham (4 Posts), admin (0 Posts), Brent (0 Posts), AGLegit (0 Posts)

Moderators: thowlett (41 Posts), hbomb (2 Posts), khowlett (0 Posts)


© Simple:Press  

 

Copyright © 2011 Ingz, Inc | Website by Psyber Studios

  • Contact
  • Press
  • Privacy Policy