AI Framework works!
Forum » Fragmented Galaxy / Game News » AI Framework works!
Started by: Craig MacomberCraig Macomber
On: 1196574860|%e %b %Y, %H:%M %Z|agohover
Number of posts: 7
rss icon RSS: New posts
Summary:
Well, the first half works
AI Framework works!
Craig MacomberCraig Macomber 1196574860|%e %b %Y, %H:%M %Z|agohover

After putting together the AI Framework yesterday (About 5 hours of work) I was eager to try it out so today I switched our viewing system over to use the AI Framework. Basically this tested the observers (things that gather information for the player and AI), observations (what the observers produce) and objects (what looks at the observations. Things like ships and fleets). In this case the an object is hooked up to the player which sends the observations out to the client to render.

So now I need to optimize the framework, document how to use it for our other developers, and test/use the other half. The other half of the framework consists of the objects producing urges which are then applied to the relevant controls (what drives ships, controls guns etc) which in turn will produce urges for sub controls (fire thrusters, shoot weapons and stuff like that).

To test this half of the framework we will have to control some ships, so expect to see some controlled ships eventually, but you might get better client side camera control (By Matt) and some lag/graphics improvements first.

Now just for fun, some neat features and random facts about our plans for the AI Framework:

  • The player is just one of many AI Objects
  • You only see what your ships and stations (Observers) can see. (Fog of war)
  • Important old observations (ones that objects are still interested in) are keep so you can see where stuff was when it went out of site (This is possible, but if/how it will be displayed is not decided), and the AI can act on it.
  • AI Objects know when to compromise and when to make decisions (or do both).
  • AI Objects communicate (share urges). Allows fleets to call for backup, lets ships concentrate fire on the enemy that they could (collectively) kill the fastest or is doing the most damage, can let ships ask for help if they are taking heavy damage (they can ask ships to intercept the damage and/or focus fire on the enemies doing the damage)
  • Fleets have AI Objects just like ships so there is intelligence on both levels and communication on and between both levels. Ex: A ship can ask the fleet to retreat. If enough ask (how much demand is required will be adjustable) it will retreat.
  • Priority scalers and compromise settings can be adjusted. This means we can allow players to do things like up the importance of the protection of a given ship or adjust the factors involved in choosing a target enemy.
  • Players can rebalance decisions to adjust like deciding to advance, hold or retreat.
  • Compromise settings can be adjusted allowing things like adjusting the importance of maintaining formation in retreat or allowing/disallowing individual ships to retreat.
  • And lots of other stuff!

(random idea: using almost dead ships as battering rams. We could do that…)

Sound cool? Lets hope we can get it all to work.

The main goal of the AI is to not give an advantage to an online player when he is attacking an offline one and manage all the little things the player can't (aiming, thrusting, shooting), but our AI should also add tons on strategy. Fully customized ships and fully customized AI if you want allows for some intense strategy making. We will have to decide how custom we let the AI get, but I'm thinking very custom.

I wasn't really planning to go do the AI Framework, but I had time and Matt is working on the client, so we have some unplanned bonus progress ;)
I will get back to what I should be doing soon (Making the client graphics reasonable and fixing/finishing our database app for ship parts and such).

Well, lots of fun AI information in this post so enjoy and discuss.
- Craig

unfold AI Framework works! by Craig MacomberCraig Macomber, 1196574860|%e %b %Y, %H:%M %Z|agohover
Re: AI Framework works!
Craig MacomberCraig Macomber 1196585028|%e %b %Y, %H:%M %Z|agohover

I just finished the basic optimizations to the AI and a few other things in the server. The server is now much smarter about sending out updates (no longer sends them out only when asked for by the client) so the lag issues should be better when we switch to the new server. After a bit more testing I will switch the server and maybe provide an updated client, but I think I will wait for Matt's control fixes before I upgrade the client.

Thanks for reading,
- The midnight coder

unfold Re: AI Framework works! by Craig MacomberCraig Macomber, 1196585028|%e %b %Y, %H:%M %Z|agohover
Small Update
Craig MacomberCraig Macomber 1196623118|%e %b %Y, %H:%M %Z|agohover

I have now fixed the disappearing star and planets bug and I have figured out how the stars flicker but not why.

unfold Small Update by Craig MacomberCraig Macomber, 1196623118|%e %b %Y, %H:%M %Z|agohover
Re: AI Framework works!
PhenocaPhenoca 1196626669|%e %b %Y, %H:%M %Z|agohover

And lots of other stuff!

Heh, indeed! I am worried about the movement AI, if ships do in fact collide with things.
Also, how complex do you want ship-movement, such as gravitational-slingshots?

random idea: using almost dead ships as battering rams.

Hmm, or cannon-fodder?
As you stated, inter-ship collisions are hard, yet it could work :D
Perhaps even to knock one enemy-ship into another enemy ship, and mess-up everyone's hull integrity and weaponry-aim :)

We will have to decide how custom we let the AI get, but I'm thinking very custom.

Yes, the AI will be an on-going project.
It can always be improved.
Even if you have a perfect AI, it can get better as the average human gamer changes their strategy, or AI can always have special cases for counter-acting human strategies.

I wasn't really planning to go do the AI Framework, but I had time and Matt is working on the client, so we have some unplanned bonus progress ;)

Good job!

The server is now much smarter about sending out updates (no longer sends them out only when asked for by the client) so the lag issues should be better when we switch to the new server.

Great!
Glad you got some sleep too.

No idea why stars flicker. I have never noticed this in the client.
Perhaps something to do with thermal-movements in the atmosphere causing starlight to refract?
:D

unfold Re: AI Framework works! by PhenocaPhenoca, 1196626669|%e %b %Y, %H:%M %Z|agohover
Re: AI Framework works!
PhenocaPhenoca 1199296392|%e %b %Y, %H:%M %Z|agohover

*bump post*

How are we going to reduce server-stress on monitoring variables for each ship?

Idea (1): Ships go into an inactive mode when their movement course is set, and only scan for other objects every 5-10 seconds.

Idea (2): A player can only control "n" number of fleets, where "n" is dependant on their technology level (and their number of flagships).
Any ship could be assigned as a flagship, and when selecting a fleet, the flagship is automatically the "focus" of the camera.

last edited on 1199296642|%e %b %Y, %H:%M %Z|agohover by Phenoca + show more
unfold Re: AI Framework works! by PhenocaPhenoca, 1199296392|%e %b %Y, %H:%M %Z|agohover
Re: AI Framework works!
Craig MacomberCraig Macomber 1199487450|%e %b %Y, %H:%M %Z|agohover

All observers keep lists of what they can see, or are close to being able to see. Same goes for AI objects and their interests. This means that the AI framework can perform a "quick update" where no brute force scanning is ever done. This is all already built in.

unfold Re: AI Framework works! by Craig MacomberCraig Macomber, 1199487450|%e %b %Y, %H:%M %Z|agohover
Re: AI Framework works!
PhenocaPhenoca 1199642124|%e %b %Y, %H:%M %Z|agohover

Great! I have played some games with really inefficient coding, and I am glad you were able to foresee this problem.

unfold Re: AI Framework works! by PhenocaPhenoca, 1199642124|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License