AI coding overview

Discussion in 'General Discussion' started by Sithuk, Oct 15, 2016.

  1. Sithuk

    Sithuk Cadet

    Posts:
    1
    Joined:
    Oct 15, 2016
    Hi Adam,

    Please can you give us an overview of your strategy for the AI coding?
     
    • Agree Agree x 1
  2. Adam Solo

    Adam Solo Developer Administrator Grand Admiral

    Posts:
    4,846
    Joined:
    Sep 9, 2016
    Hi Sithuk, welcome to the forums.

    The AI is still pretty much nonexistent at this stage (pre-alpha). At the moment we have some dummy AI in place for diplomacy and in the space combat mostly for flavor, but that's pretty much it.

    As for the strategy for the AI design and coding, that's actually something I'm about to start working now. The plan is to have basic AI for alpha1 (site pre-orders), advanced AI for alpha2 (some form of a more broad external early access, think Steam Early Access, well see) and the AI finally all in place when we reach beta.

    Thanks for bringing this topic up, as I'll take the opportunity to ask everybody's opinion on good approaches for the AI design and coding for a game like this. I will be all over this in the following months, so every suggestion or piece of advice you may have is most welcome.
     
  3. dayrinni

    dayrinni Ensign

    Posts:
    45
    Joined:
    Oct 14, 2016
    Perhaps looking into a modular type AI, where you could put different pieces together to form a bigger AI, and have variance between them? For example, you could have one AI colony module for "aggressive expansion" and then another for "slow expansion". Depending on how modular you get, you could further break these up into modules (ie: how they decide when they want to colonize, and then what they want to colonize). Then you can reuse these bits in other locations and different modules. You can encapsulate and abstract this so from a processing perspective, you would have consistent interfaces.

    Just some thoughts and ideas!
     
    • Helpful Helpful x 1
  4. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    Just my thoughts regarding AI:

    Micro Management Fiddler or Tweaker

    The Question is How deep do you want to dive ?

    I believe there is only one answer to this, and it is All the way to the bottom level.
    Even if you do not intend to go that far, you should have the option to do so.

    Consider a Game like a Book, where you can go Any where between the Front and Rear Cover.
    However a Game can Offer AI Management Narrators, and Summary Advisers, to Manage, Guide, and Help you.

    Now think of a Game as a Collection of Books, Each of which represents a Point in Time in the Game.
    Your Progress in Game is Located between the First Cover of the First Book to the Last Cover of the Last Book.

    Now think of these books as having not only One Linear Dimension of Time Progression
    in the advancement of the Story and your Progress in the Game.

    They also have a 2nd Dimension of Depth into the Mechanics and Relationships of Cause and Effect
    that give you the Results of Decisions Made, and their effect on the Game.
    These Results should be available for every Second, minuet, Hour, and day of the Game Time You Play.

    This 2nd Dimension can include, relationships to NPC's in Game, both Friendly and Hostile,
    adding extra depth to the Cause and Effect Results in Game.

    These Effects and Results are Controlled and relayed to you from Your Direct Decisions,
    and your choice of AI Managers, and their Decisions.

    When invoked, Summary Advisers can Explain to you the current situation and what the results will be,
    based on your decision and or that of your AI Manager, giving you the option to change any decision,
    in order to receive the result you want.

    These AI Managers and Advisers, should be placed at every level of every Chapter of the Game.
    So that as you play the Game, You can take control of any thing under your command directly.
    OR you can do little to nothing, relying on your AI Managers (That you have picked) to handle
    the situation for you.

    All things that will have a certain level of impact on the Game (which you can set),
    will immediately Alert you and give you Direct access of Command. Whereby you can
    consider and determine which choice you want to take and pursue in the Game.

    With or Without an Alert, you should be able to go to any place and point in
    the Game, and be able to Fiddle or Tweak, as much as you like.

    This allows you to be a Fiddler, Micro Managing the smallest detail,
    or a Tweaker only attending to the most pressing Alerts, and top level decisions.

    Either way, How you want to play today, should be available to all.
     
  5. rxnnxs

    rxnnxs Ensign

    Posts:
    120
    Joined:
    Oct 15, 2016
    This reminds me of Distant Worlds of course.
    I have a huge problem with this, if i can fiddle, i WILL fiddle!
    i can not lean back when i know i could manage it myself.

    i have to have my fingers everywhere and then i got nothing accomplished.
    but serious, i would love to have a red line, some things that happen under the hood, that keeps me thinking some magnificent, self aware being does the thinking.
    if i can decide if at secor 5,43 on planet 491.1 shall be crops instead of a energy plant, i will do it myself.

    i do not even want to be able to change this (make it switchable somehow), i would like to have it magically happen -> crops are built by the population itslef, kindof like the civil ships and mines in DW (if i chose so at the creation of the galaxy).
    or kind of like in SEV where you can say if you want advanced options or only the easy mode.
     
  6. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    This is Exactly why I felt like Alerts would be the best balance betweem Fiddlin an Tweaking.
    I believe that the larger your empire the more Alerts you will have that will keep you busy, Hopefully without over doing it.
    Another Thought is Communication Distance, the Further away you are located in the game, should take a longer time to receive alerts from
    X Solar System, unless you have built Special Relays to that system that connects your location with it.
    Lets say you are at the center HQ at your Home World, and you have Planet A on the west fringe of your empire, and you have Planet B
    on the east fringe of your empire. You have built Comm Relays to the west but not to the east.
    Therefore you will receive Info from the west faster than from the east. This may require you to Either build relays to the east,
    Send a Comm Ship to the East or Move Yourself Closer to the east in order to get Timely info updates.

    Hopefully you have chosen and sent Managers for all departments, that are competent enough to take care of any unexpected event.
    The Alerts would then reach you later but would advise you of their Actions an Decisions in any event, so you could decide if you
    need to go fiddle or not. Of course it takes an amount of Time to travel there, Or build comm relays to that solar system.
    Either way you will be forced to lay back for the duration.

    AI Managers should not be Gimped in any way, But should Show their level of Competence for a Job, Which would be based on
    Training you have given them, and Time they have spent in that Job or similar Jobs. Maybe there are spots for 2nd and 3rd backup managers,
    that would add to or raise the overall level of competence up to or closer to 100%.
    Of course during an attack, there is the chance that any or all of them would be killed, which would require you to shuffle some managers
    from other Departments to take over that position until you can send replacements.

    All in All, I do not want to be Forced to Fiddle UNLESS it is a MAJOR GAME CHANGING EVENT.
    And I hope the AI Managers in that event are Trained up enough to Midigate the damage, to the lowest effect.

    After all I am the Commander, Not a Clerk :)
     
  7. rxnnxs

    rxnnxs Ensign

    Posts:
    120
    Joined:
    Oct 15, 2016
    information lag, that sounds interesting but is something very new. it should be tested, maybe tested as a mod.
    and yes, this game should be easy to mod :)

    the automation could also behave like in MoO3, seen in the development plans or to take another game, lets say Baldurs Gate or was it Dragon Age?, where you could set the behavior in case of being attacked, wounded and so on and what then shoud be done...
    but we are going here maybe too far in detail and like they said, they have everything together and just need some finetuning here and there..


    the good thing with this behavior programming is, that it could be used for the AI and, like said above, can be done in bits and pieces and put together for different races, and also be used for the player himself, playing then from full automated up to no decision is made and all has to be decided by the player.
    so it would develop by itself while the programmer is checking how the algorithms work.
    if they work, you can "click" them together.

    ---
    warning and sorry, this is off topic

    and this is what i really miss at most games:
    lets take Distant Worlds again for an example:
    i did not like the musik that much, and put in the stellaris music. it was not that hard, but the implementation could be easier.

    another example is the information window that comes in from the right side sliding in, when something important has happened.
    yes, you can tweak this information window at what occasions it informs us,
    BUT WHAT YOU COULD NOT DO: tell the window how long it was there!
    when i am busy somewhere else, sometimes i can not even look at this information in the right time.
    NOT EVEN PAUSE did stop the window from vanishing again.
    okok, in the top scroll bar, all of this stuff can be read, but i like to watch at this window and enjoy the graphic an dgo there when i want to.
    other games also slide those information pictures from the bottom to the top, but also do not stay as long as i would like them to.

    you know, it is better to make less things, but then do those things well done.

    menues should be resizable, and not "hardcoded" as again in i.e. DW.
    ups, this was very OT, sorry.
     
  8. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    Agree 100%
    Alerts should stay untill clicked, How many times missed info could have been used, if not taken away instantly.
    What I never understood is how Devs could think a Split second is usefull, may as well have no alerts in this case.
    Good Luck remembering 20 or so alerts across a vast Empire, when they only appear out of the corner of your eye,
    and dissapear before you can focus on them, much less understand their import.

    Maybe this is related to the Knee Jerk spam the button mentality seen today.
    This all needs to go away on the PC.
     
  9. dayrinni

    dayrinni Ensign

    Posts:
    45
    Joined:
    Oct 14, 2016
    If there is information/comm lag, is the player still able to manually open up the planet and look at the statistics in there? Or will those stats lag too? Maybe this is implied and I just need more coffee :p
     
  10. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    A Few more Thoughts on Communication:
    So Communication in the Universe is a Very Real Bottleneck, as Factions can mount attacks or move Fleets
    long before you get word of the events, because of the Time needed to send an receive Reports an Updates,
    from the various corners of your Empire.

    Maybe you have cut that time down at much expense, to build relays or send express couriour ships to an from
    sectors having Game changing Events happening. Maybe you have to move closer or even go to that point,
    in order to avoid negative results impacting your empire. Hopefully your AI Managers are up to the task,
    until you can intercede and solve the situation in your favore.

    The drain on your Empire, just to maintain contact becomes staggering. Not to mention the nessccesary upkeep
    and cost of maintaining a sufficent intrastructor.

    However your insight in backing research into Quantum Physics has given you a way to have Instant communication
    based on Quantum Entanglement, this gives you a Enormous advantage over other factions who face the same
    problem with communication as you had before.

    This Tech has given you Instant contact anywhere in the Universe, It is now only a matter of Installation,
    and the logistics of upgrading all your assetts, mobile and stationary.

    Further research shows that non-living Items can be broken down into their atomic state, and like wise
    sent at an Instant to any point in the Universe, Streamlining and reduceing the cost to maintain your
    supply chains, across the Universe.

    You keep this reasearch and Tech behind the Highest Security you can provide, only those with the highest
    degree of trust are allowed to operate or be around these Comm an Shipping points.

    You continue to use relays and courier ships, in order to keep your Tech Secret.

    A rumour begins to take form, saying you have Eyes an Ears, even on mice.

    Sorry if I am somewhat off Topic here, but this connects with the Need to have Competent AI Managers where,
    you may not receive any News until after the Dust Settles.
    I Really Really Like how they set up the AI in Dragon Age where you set the perimiters and then Tweaked when needed
    with the Learning Chair. Would love to see this in Game, which would take a Load off your shoulders, yet still give you
    direct take over control. (which might be limited due to distance)

    But Consider that AI in all its forms, is what delivers the Meat an Potatoes of a Game.

     
  11. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    Consider that you would not know of anything happening until you receive an Alert,
    You can look at the planet to see the current situation, but maybe you can not do anything about it,
    untill they receive your orders, or you move closer the planet involved.

    Think of the Attack on Pearl Harbor, no one in the States knew anything about it until it was all over.
    Now consider if there had been a Plane, Ship, or Listening post that could have sent the information
    about an impending attack, Prior to the arrival of the enemy fleet arriving into range for the strike.
    Things may have turned out much different.
    All due to the distance an speed of communications.
     
  12. Neil

    Neil Ensign

    Posts:
    30
    Joined:
    Oct 20, 2016
    Will miss spacesector, but excited about a MOO2 'clone' made by fans :)


    Anyway, don't know if you've read this article, but I think it is well worth looking at with regards this topic..

    https://explorminate.net/2014/12/20/158/

    The gist of argument it makes comes across from the quote -

    "We should shift our point of view and stop judging the AI by human player standards. Instead, the truth that we should recognize is that a 4X game is a strategy game for the player, not the AI."


    My thoughts are we aren't going to develop AI capable of playing a 4X well anytime soon. A paradigm shift is needed, which is to stop viewing the AI as a player. Lots of 4X games have non-playable minor races. I think we need to look at non-playable major races. People don't complain about the aliens cheating in games like XCOM, because they aren't supposed to be players in an equal game. When you treat the AI as a player, then give it a bunch of bonuses, people think it is cheating. If the AI is not treated as a player, but as a challenge, you open up a world of possibilities. How about a religious fanatic species, that start out way ahead of the player, so he/she has to appease them and their crazy religious demands until their tech surpasses them? Or a zerg-style swarm appearing in the mid game?
     
  13. Adam Solo

    Adam Solo Developer Administrator Grand Admiral

    Posts:
    4,846
    Joined:
    Sep 9, 2016
    Welcome to the show @Neil!

    To the topic. So, to see other races as major NPCs only, not competing for the same goals. Basically, they would be challenges and menaces that you'd have to deal with as you go. A pure Player vs Environment thing.

    It's an interesting thought, but I wonder what that would do to the 4X game dynamics when you no longer feel that there are other players out there (AI players in this respect) that are competing with you for the same goals, where you would no longer see graphs and stats for comparing your progress and performance against. Would that make the experience less interesting? After all, why not have everything? Symmetric players and NPCs/challenges/menaces.

    If it's just to solve the AI issue, the AI not being challenging enough without cheating, perhaps there could be other ways to achieve that without having to remove symmetric players from the game entirely? Perhaps the article goes in depth about these matters.

    Anyways, an interesting thought worth dabbling into, and it does tie in with our vision for the victory dynamics in some regard.

    I'll give the article you mention a read. Thanks.
     
  14. Neil

    Neil Ensign

    Posts:
    30
    Joined:
    Oct 20, 2016
    I agree with your concerns. The standard setup of a 4X pretty much defines it as a competition between players. That is where most of the excitement comes from. It may well, in practice, be a terrible idea. It just seems to me to be worth someone giving it try, since the AI issue is such a problem for 4X games. Of course, I'm not suggesting you should take the risk with your 4X!! Just raising it as an idea, since I'd read the article, and it had that 'Eureka' spark in my mind. If it were to work, these AIs would need to be a lot more than just RPG style NPCs that wait around for the player to interact with.

    It may be we just need better AI than is possible at the moment. It's a great shame the google game AI competition was discontinued, as this was a great forum to push forward game AI. The last one, the ant colony simulator, has some ingenious solutions. Certainly far more impressive than most of what you see from professional game developers!
     
  15. rxnnxs

    rxnnxs Ensign

    Posts:
    120
    Joined:
    Oct 15, 2016
    i am sorry, this is false.
    they knew but needed the deaths to change the public opinion in order to go to full scale war.
     
  16. rxnnxs

    rxnnxs Ensign

    Posts:
    120
    Joined:
    Oct 15, 2016
    I would enjoy a game where you as the player discover the universe.
    it do not like to compare myself with others because everyone is different. you could see this also as in real life, but i mean the game and how I enjoy that.

    i mean, i often start games (when it is possible) without any other races and start learning the game that way.
    now i love it to take my time, and discover planets and ruins and so on.
    sure it could be boring, but it depends on how alive the universe feels.
    and with relicts and diseases and some old race that comes back some day, the universe would never feel dead.
    there would be magnate civilizations that have to taken care of in so many ways possible (help them evolve, spy on them, migrate, let them migrate, enslave.. you name it).
    also in this way, it feels for me that the universe has to be discovered and not that it is already discovered by other lifeforms (more or less).

    Let me give you an example what it shouldn't look like:
    "elite: dangerous": you can fly wherever you want and for instance start to mine.
    what happens? someone else is also mining, and when you are about to be done, you might get shot.

    Thank you very much! the universe is so huge, the belt of lets say, saturn, is so huge, but hey, i fly to a rock and see the minig laser some rocks beside me flashing. WHAT THE HECK?!

    And to come back to the question: would it be possible and make fun?
    Sure you could implement both things.
    At the one side, the AI; but also things that are spread around the universe that have to be found.
    There is Orion of course, but also there are riddles and caves, and maybe some parallel dimensions?

    Maybe it could be possible that with some better sensors, planets or life forms just get visible that were invisible before? A new resource can be mined?
    Planets that seemed empty before are full with entities either in a different dimension or as ghost like appearances or dug deep inside the earth?

    So you could have places that are hard to colonize, and without sensors you would not even know what happens to you, and in the parallel universe you fight against your own ships :)
    i would not call it cheating if you say it from the begining that the "AI" is not having the same "tools" the players has.
    It dos not have to evolve, it is already set in a state that has its own difficult level. and that in the "ching chang chong" or lets say "rock paper scissor" + level way.

    Better than a god AI it would be that the Backgroundstory is puzzled together out of many little chunks that fit always nicely together.
    So instead of reading the same Message over and over again "The Pirates left some gold" or some deeper story about a Monument and such, it would always tell a different story and also it could lead to unexpected results when you follow this story path.
     
    Last edited: Oct 20, 2016
  17. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    I am talking about the public, like on the Radio.
    I Did not want to bring politics, no matter how true, into it.
     
  18. Staroid

    Staroid Cadet

    Posts:
    22
    Joined:
    Oct 15, 2016
    A thought about AI, remembering the past:

    When Personal Computers first hit, they were more for the Business and Rich Kid crowd.
    I seem to remember the Apple ii being around $25000.00 with all the components,
    AND NO MOUSE. Luckily, a friend of mine was a salesman for Apple,
    who brought his Demo Home, and let me play Games on it all week end.
    Trek an Eamon was the cat's meow, and got me hooked, problem was the week end ended.
    So I was like an addict with no connections, BAD BAD BAD.

    What got me through it, Dungeon an Dragon Parties, and Interactive Books.
    Does anyone remember the Interactive Fiction Books prior to Computers?

    The ones that had you Flip to a certain page depending on your choice in the Story,
    some choices brought you a early demise, while others got you the prize.
    As you went page to page, you would advance the Story line and have more Decisions,
    with more Branches, that changed and moved the Story toward it's conclusion.

    I think of this as my First use of a Form of AI,
    where you and the Book Became Both the Player an the AI,
    following a command control set,
    which took you to the next Instruction in the process.

    It is much the same today, where you make the decision of which instruction to take,
    where page flipping has given way to Buttons, keys, and mouse clicks,
    to achieve the same result, but on a Deeper an much larger scale.
    Now with the Computers Help the single page, can be like a Tree of Dominoes,
    falling into hundreds of Directions, with the result of Bringing you back,
    once again to a Single Page Full of Choices.

    So Check these links out, Hope you enjoy an learn from them.

    The Choose Your Own Adventure Books Were the First Video Games
    https://gizmodo.com/the-choose-your-own-adventure-books-were-the-first-inte-1659017465

    Interactive Fiction Books
    http://www.chooseyourownadventurebooks.org/
     
  19. Neil

    Neil Ensign

    Posts:
    30
    Joined:
    Oct 20, 2016
    You are conflating an AI with a computer program. It is certainly reasonable to think of choose-your-own-adventure books as equivalent to a computer program (they are basically state machines), but they are not a form of AI. Now, it would certainly be possible to implement, at least in theory, an AI using the mechanics of these books. However, to my knowledge, no one has ever attempted such.
     
    • Agree Agree x 1
  20. IvanK

    IvanK Lieutenant

    Posts:
    138
    Joined:
    Oct 17, 2016
    Well, in previous 4X games I certainly did get the feeling of AI's being more of challenges for a human to overcome then humanlike competitor. This topic repeatedly arises on eXplorminate forums and just separates people in two camps without real conclusion. So you are on your own, embrace one way or another, each has it's own pros and cons. AI = human moves toward multiplayer experiences which end up being either theme parks like MMORPGs or sterile overly balanced "blink and you are dead" games. AI ≠ human games have more freedom in delivering narrative but fall apart when you swap an AI with human or even try to maintain an illusion of major player following the same rules.

    About the goals of the game, single player computer game is not socially played board game. You don't have the constraint of giving each "player" a winning chance. Most players are there to have the victory for themselves, they are OK with punishment for a bad move but expect to continue progressing until they emerge victorious. Think of Darksouls, if you rush into combat unprepared or don't pay enough attention you'd die, respawn and given another chance. You are not forced to start a new game from turn 1 with a single planet. I don't say you have to fit respawning mechanic into orthodox 4X formula but to think about victory conditions from a single player perspective instead of multiplayer. Notice how in MoO 2 a player can attack Antares at his own discretion, without worrying about AI doing it first. You can also reject the ruling of Galactic Councile if an AI wins the vote. Even your source of inspiration has two out of three victory conditions where human player has more agency then AI.
     
    • Agree Agree x 1

Share This Page