Author Topic: 2013 April 2 - AI - Mini Update  (Read 30291 times)

Re: 2013 April 2 - AI - Mini Update
« Reply #15 on: April 02, 2013, 07:25:52 PM »
Well, i'm no expert on AI but i guess my first req. would be that the AI doesn't have knowledge that it should not be able to have.
But it does need to remember past intel it does have (type, amount units spotted). Pretty difficult maybe. Like panzer general where it didnt know anything about turns past so it would be easy to ambush the AI. Hope that makes sense. AI scouting should be a priority (or spying but i dont like that mechanic myself)

Good request. I definitely want the AI to have some sort of memory of the map, but I haven't yet figured out the best way to accomplish this.


Quote
The rest is a bit too difficult for me, i guess the AI should try to play to win :)
But then are we going like hardcore (see player winning, allying to destroy player) or more civ-like. I dont know.

A strategy game AI should always be able to present a challenge. It's much easier to make a smart AI dumb than "teaching" a dumb AI to be smart! :) It's particularly important that the AI in AtG knows what it's doing since combat is so heavily dependent on supply, rather than sheer numbers.

- Jon

Will the AI be functioning according to some sort of 'power' rating of military strength, beyond what it has actually encountered in the game?  If so it facilitates players having the option of keeping some of their units hidden from particular opponents, if not will human players also get access to the power ratings of the cpu players?  Basically the question is whether the AI will be in the same situation informationally as the player.  Personally I would like to see both player and AI having access only to information revealed by their actions in game but that probably makes the task of building an 'effective' AI harder... 

So I would like to see the AI never act on information it would not have possessed if it was a human player.  I would also like the AI never to materialise resources or units (or perks, etc) out of thin air but only to acquire them through the same mechanisms accessible to the player.  (Percentage differences at difficulty levels should not change the basic mechanisms.)

At the cutthroat level of AI challenge it would perhaps be more thematically appropriate for the cpu players not to ally even if they are all directing their efforts to taking down a top dog human player.

As high level architecture the brainstorming seems good to me.
Windows Vista Home Premium 32 bit SP2
Intel Core 2 Duo T6400 @2.00 Ghz
2Gb RAM
ATI Radeon Mobility HD3400 with 512 Mb RAM
Humble Bundler

Re: 2013 April 2 - AI - Mini Update
« Reply #16 on: April 02, 2013, 08:18:56 PM »
Most important thing to focus on? How about making the AI easily scriptable and modifiable? Playing with AI scripts could be a lot of fun for some players, and perhaps the most interesting and effective AIs would emerge from the collective efforts of those players.

Re: 2013 April 2 - AI - Mini Update
« Reply #17 on: April 02, 2013, 08:47:02 PM »
How about making the AI easily scriptable and modifiable? Playing with AI scripts could be a lot of fun for some players, and perhaps the most interesting and effective AIs would emerge from the collective efforts of those players.

I second this idea! It would be difficult for sure, but I would love to be able to play the game as an AI player. I think it would be really cool to be able to script out an AI, or plug-in an AI template that can be modified, and just watch the game play out. Basically see if as the player you could script/configure/tweak and AI that could beat your AI  :P  Seems like it would be really fun.

Jon Shafer

  • Lord of the Forest
  • *
Re: 2013 April 2 - AI - Mini Update
« Reply #18 on: April 02, 2013, 09:04:17 PM »
Will the AI be functioning according to some sort of 'power' rating of military strength, beyond what it has actually encountered in the game?  If so it facilitates players having the option of keeping some of their units hidden from particular opponents, if not will human players also get access to the power ratings of the cpu players?  Basically the question is whether the AI will be in the same situation informationally as the player.  Personally I would like to see both player and AI having access only to information revealed by their actions in game but that probably makes the task of building an 'effective' AI harder... 

So I would like to see the AI never act on information it would not have possessed if it was a human player.  I would also like the AI never to materialise resources or units (or perks, etc) out of thin air but only to acquire them through the same mechanisms accessible to the player.  (Percentage differences at difficulty levels should not change the basic mechanisms.)

At the cutthroat level of AI challenge it would perhaps be more thematically appropriate for the cpu players not to ally even if they are all directing their efforts to taking down a top dog human player.

Not sure yet. The goal is to eliminate or at least minimize AI cheating, but it's also important that it's able to put up a challenge. If we develop a non-cheating AI and it's not strong enough we'll probably have to give it aids of some kind. I couldn't say what those might be at this point though.

- Jon
If you have any questions, please send me a private message here on the forums or an email at [Contact@ConiferGames.com]. Thanks for your support!

Jon Shafer

  • Lord of the Forest
  • *
Re: 2013 April 2 - AI - Mini Update
« Reply #19 on: April 02, 2013, 09:04:48 PM »
Most important thing to focus on? How about making the AI easily scriptable and modifiable? Playing with AI scripts could be a lot of fun for some players, and perhaps the most interesting and effective AIs would emerge from the collective efforts of those players.

Well, we'll be releasing the source code for the entire AI, so hopefully that fits the bill. :)

- Jon
If you have any questions, please send me a private message here on the forums or an email at [Contact@ConiferGames.com]. Thanks for your support!

Re: 2013 April 2 - AI - Mini Update
« Reply #20 on: April 02, 2013, 09:21:26 PM »
Personally, I want the AI to be as close to playing another human as possible in a non-multiplayer game.

So the AI should:
1) set sensible short-term goals within a longer-term framework (for instance longer term framework is develop infrastructure and army to enable successful attack on X; short term goal might be get more iron)
2) respond to changes in environment (X has left his area weakly defended to attack Z => opportunity to attack earlier than planned)
3) band together with others to respond to emerging threat (if possible) or else avoid threat (e.g. flee if possible, ally/become vassal if flight not possible).

Fundamentally, a tactically and/or strategically weak AI is going to mean the game plays poorly, because it lacks challenge. So the more time you spend on this the better IMO.

Re: 2013 April 2 - AI - Mini Update
« Reply #21 on: April 03, 2013, 04:52:43 AM »
Will the AI be functioning according to some sort of 'power' rating of military strength, beyond what it has actually encountered in the game?  If so it facilitates players having the option of keeping some of their units hidden from particular opponents, if not will human players also get access to the power ratings of the cpu players?  Basically the question is whether the AI will be in the same situation informationally as the player.  Personally I would like to see both player and AI having access only to information revealed by their actions in game but that probably makes the task of building an 'effective' AI harder... 

So I would like to see the AI never act on information it would not have possessed if it was a human player.  I would also like the AI never to materialise resources or units (or perks, etc) out of thin air but only to acquire them through the same mechanisms accessible to the player.  (Percentage differences at difficulty levels should not change the basic mechanisms.)

...

uhhh i totally agree with feelotraveller! i'd love an AI that "sees" and "knows" only what a human player would! of cause that would mean to make the AI strong enough well... to beat a human player without these 'advantages' ;) i also do hope that the AI does not too much "wait" and "react" but also follows a primary goal of survival and domination so that it actively sends out scouts, recognizes strategical opportunities and "acts" with determination (just like a human player would :) )

Re: 2013 April 2 - AI - Mini Update
« Reply #22 on: April 03, 2013, 04:59:08 AM »
I like the idea of having that AI available to the player even if it is only as advisors (like chess or Civ series). The divisions of AI is perfect, yet overwhelming, probably the TAI is the most important one as without good tactics all the other planning is worthless.

I guess also that there is communications in both directions for the different AIs, so if for example the TAI is taking heavy losses or gets stuck it could tell the HCAI that the current plan is impossible to complete, so that the HCAI issues a different order.

Also how about introducing bluffs in the higher AIs, for a given objective have a bluff chance, so that it starts performing the plan but at some point it is cancelled, that could give a hard time to the player and so you cannot learn the AI actions so easily. If fact for all the rules I expect to have some variable thresholds so that the AI is less deterministic and exploits/weaknesses are harder to find.

Jon Shafer

  • Lord of the Forest
  • *
Re: 2013 April 2 - AI - Mini Update
« Reply #23 on: April 03, 2013, 01:06:57 PM »
I guess also that there is communications in both directions for the different AIs, so if for example the TAI is taking heavy losses or gets stuck it could tell the HCAI that the current plan is impossible to complete, so that the HCAI issues a different order.

The TAI probably won't communicate directly with the HCAI, but the latter will need a great deal of information at its disposal in order to make decisions at all. If the HCAI has no idea how good or bad the situation is on the fronts then it won't be able to intelligently move reinforcements around, request new Units be trained, etc. We'll have to see how things play out though, as the data generated by the TAI actually may be of some use to the HCAI after all. I can't say for sure at this early stage.


Quote
Also how about introducing bluffs in the higher AIs, for a given objective have a bluff chance, so that it starts performing the plan but at some point it is cancelled, that could give a hard time to the player and so you cannot learn the AI actions so easily. If fact for all the rules I expect to have some variable thresholds so that the AI is less deterministic and exploits/weaknesses are harder to find.

I might try this out down the road, but as I noted in my response to Emaze the first and vastly more important goal is ensuring that players believe the AI has, you know, a strategy at all. Most of the time they just seem stupid and random, and in that context any kind of "bluff" is going to be completely wasted effort. On the plus side, if you do manage to build a clever and sane AI, the next step of having it act deceptive is trivially easy by comparison!

- Jon
If you have any questions, please send me a private message here on the forums or an email at [Contact@ConiferGames.com]. Thanks for your support!

Jon Shafer

  • Lord of the Forest
  • *
Re: 2013 April 2 - AI - Mini Update
« Reply #24 on: April 03, 2013, 01:11:52 PM »
I quite like the breakdown into Objective, High Command, and Tactical levels, as that appears to pretty closely follow the highly effective hierarchical model of Strategy, Operations, and Tactics.

Some things that occur to me based on that reading:

1. There's also the highest level of Grand Strategy (basically a "vision" level of action). Although AtG seems intended to be more a fun conflict-focused game than a general nation-simulator, one element of grand strategy could be distinctive cultural characteristics. These would be the top-level qualities that influence Objectives.

To what extent will a simulated player's actions be guided by cultural elements?

Cultural preference will definitely be represented, and you're right that an overarching game strategy will have to be represented in some manner. I haven't decided whether I want it to be a distinct "grand strategy" level of AI, or simply a blend of important Objectives and built-in leader personality preferences. You nearly always want the simplest system that can get the job done, so it's a matter of whether or not this can be done with what I've outlined here, or if another layer is needed.

Having thought about this some more, I've decided that a fifth "Grand Strategy" layer is indeed a good idea. It's the simplest way of providing overarching guidance to the entire game.

I took this basic approach in Civ 5 as well and it wasn't particularly effective, but I now think that was mainly because it was too generic. It turned up and down knobs for military, culture, etc. but it didn't have any specific priorities. By contrast, in AtG the Grand Strategy AI will provide directives like: "Iím going to try to win by making friends with the Romans, stay out of major wars and feast on the weaklings." It will be easy to score various Objectives with something like this.

- Jon
If you have any questions, please send me a private message here on the forums or an email at [Contact@ConiferGames.com]. Thanks for your support!

Re: 2013 April 2 - AI - Mini Update
« Reply #25 on: April 03, 2013, 01:39:30 PM »
Quote
Having thought about this some more, I've decided that a fifth "Grand Strategy" layer is indeed a good idea. It's the simplest way of providing overarching guidance to the entire game.

Glad to hear this was helpful, at least for now. Breaking it out as a top-level guide system seems reasonable -- making control points distinct in code should (in theory) help with debugging and enhancement.

Or it may wind up being better folded back into the OAI. I look forward to hearing how the testing goes. (And I can't say enough good things about your willingness to discuss your design thinking for AtG. It's very helpful for young designers... and I hope occasionally fun for you, too. ;) )

Jon Shafer

  • Lord of the Forest
  • *
Re: 2013 April 2 - AI - Mini Update
« Reply #26 on: April 03, 2013, 01:56:36 PM »
Glad to hear this was helpful, at least for now. Breaking it out as a top-level guide system seems reasonable -- making control points distinct in code should (in theory) help with debugging and enhancement.

Oh yeah, feedback and suggestions are always welcome. A designer's job is to come up with a vision and then filter what ends up in the final product. The vast majority of ideas that end up in games I've designed weren't my own - you really have to be willing to draw from anywhere.


Quote
Or it may wind up being better folded back into the OAI. I look forward to hearing how the testing goes. (And I can't say enough good things about your willingness to discuss your design thinking for AtG. It's very helpful for young designers... and I hope occasionally fun for you, too. ;) )

Absolutely! The ability to share what I'm up to whenever I want in whatever manner I want is one of my favorite parts of being an indie. I just wish I had more time. :)

- Jon
If you have any questions, please send me a private message here on the forums or an email at [Contact@ConiferGames.com]. Thanks for your support!

Re: 2013 April 2 - AI - Mini Update
« Reply #27 on: April 03, 2013, 03:55:48 PM »
When a professional like yourself is willing to give young designers a chance to see the process, it's good for the whole industry. Everybody wins.

The tricky stuff is related to ownership of ideas -- it just takes one person claiming a developer "stole" "their" idea to make everyone rethink design-stage openness. That's the other part of why I admire and appreciate how you're running this effort from the KS updates onward.

On the subject of time... yes. :) If you really want to see "terrifying" in action, Chris Park of Arcen Games not only cranks out code at a prodigious rate, but the size and solid detail of his devblogs are truly epic. He is obviously an advanced AI construct.  :D

At any rate, thank you again for the peek behind the kimono, and I look forward to hearing more about the AI and other design choices as you and the team get closer to Alpha Day.

Re: 2013 April 2 - AI - Mini Update
« Reply #28 on: April 03, 2013, 06:50:24 PM »

Not sure yet. The goal is to eliminate or at least minimize AI cheating, but it's also important that it's able to put up a challenge. If we develop a non-cheating AI and it's not strong enough we'll probably have to give it aids of some kind. I couldn't say what those might be at this point though.

- Jon

Like the goal.  If cheats are added in for competitiveness please spare though for how they might effect the player.  If possible the player should know what they are and what triggers them.

(One of my two memorable losses in civ II came when I made the mistake of building a couple of forts within the BFC's of a couple of AI cities.  Much later I found out why - AI cities got massive production bonuses (usually equal to a unit a turn) when hostile units of warring civ's ended their turns in the BFC.  Placing the forts one tile further away led to much easier games once I knew that.  Basically I felt chumped, not because I lost, but because I was denied the information to make strategic decisions.)
Windows Vista Home Premium 32 bit SP2
Intel Core 2 Duo T6400 @2.00 Ghz
2Gb RAM
ATI Radeon Mobility HD3400 with 512 Mb RAM
Humble Bundler

Re: 2013 April 2 - AI - Mini Update
« Reply #29 on: April 03, 2013, 07:50:53 PM »
Is it possible to say more about how much the AI knows about the map and units it is facing? You mentioned above that this was still unclear, but I wonder what the 'standard' approach is, say in Civ?

Obviously one possibility is that the AI knows all. This means it has no need to scout out terrain and won't be lured into any traps.

The other end of possibilities is that it just knows about what it can currently see. The problem here is that it will not take into account an army (say), that it saw retreat, and knows 'is somewhere around there', and will possibly do a range of dumb things because of that. Even 2 year olds have object permanence, and so the AI needs some level of 'army permanence'.

The extreme possibility is that the AI takes every piece of knowledge (sighting an army, etc) and its knowledge of what is possible in the rules (movement rates, etc) and models not only things it knows because it can see them, but also things it knows because it can deduce them. This requires serious logic processing, and is quite hard (encoding the rules, etc).

Since I have tried to figure out these things for myself (I wrote an AI for a game a few years ago), I may well be missing some pretty standard 'tricks' of how this is done in practice.
  • Steam
  • Windows 7 HP, SP1
  • English (Australia)
  • i7 2.67Ghz, 64
  • GeForce GTX 560 Ti
  • 1920x1080