Logo Platform
logo amplifiers simplified
Endless Space 2
Universe banner wording

ENDLESS™ Space 2 is turn-based 4X space-strategy that launches players into the space colonization age of different civilizations within the ENDLESS™ Universe. Your Vision. Their Future.

ENFER AI debug tools

Reply
Copied to clipboard!
7 years ago
Apr 20, 2017, 4:08:57 PM

The decision graph is a bit daunting at first, but we've gradually added a set of filters and search functions to help you find what you're looking for


Let's start with some vocabulary:



The graph is made up primarily of coloured "nodes" - each node has a "motivation" value associated with it; the node's colour is defined by its motivation (hot colours for important things, cold colours for unimportant ones):  



Motivation defines the maximum amount of resources (dust, titanium, fleets, law slots, ... etc are considered "resources" by the AI) that the AI is prepared to attribute. Even the most questionable objective will be pursued if it costs the AI nothing to perform it


You can filter by motivation using the slider in the top bar of the decision graph:



The big grey rectangles are called "contexts" - they are basically just used to organise the graph nodes into neat little packages:


You can filter by context using the drop-down list at the far-right of the top bar, you'll notice that some contexts have the same name - debug tools can sometimes have bugs too  There should be enough to be getting on with though:



The rectangular nodes are called "tasks" - these are specific operations that the AI can perform in-game. A task can involve just clicking on a button (for instance, "bribing a minor faction") but it might involve a number of clicks over the course of a number of turns (for instance, "moving a fleet to specific node and launching an invasion"). No matter how simple or complex a task an Actuator is required to carry it out (see the previous post):


Each task has a "status" which defines the colour of its border. You can filter by task status by selecting the status you want to see in the top bar:

  • tasks that are "waiting for validation" have not yet been considered for resource allocation.
  • tasks that are "ongoing" have had resource allocated to them and as currently being carried out by an Actuator.
  • tasks that are "succeeded" have been successfully carried out by their Actuator.
  • tasks that are "failed" had had resources allocated to them, but there has been some issue: for instance a fleet assigned to a task might be destroyed before it can complete its objective.
  • tasks that are "cancelled" had had resource allocated to them, but these resources have been taken back and reallocated: for instance a fleet might be reassigned to a more important mission, like defending the AI's home system.
  • tasks that are "denied" have been considered for resource allocation, but were deemed not important enough to merit the required resources.


The ovular nodes are called "goals" - these are more abstract and long-term objectives than tasks: increasing your empire's science production is a goal, queuing a specific system improvement in one of your systems is a task. A task is really just a step towards a goal:



The arrows that connect nodes together are called "generators" because they generate the tasks and the goals and initialise their motivation. When multiple generators create the same goal/task the motivation of the resulting node is all the higher:



You can zoom in and out using the scroll wheel, left-click and drag to pan around and left-click on nodes to examine them. This can be used to understand where a task's motivation is coming from, provided you've activated heuristic debugging  (see previous post). Looking at a task we can see a bunch of information, but what's really of interest to us is where the task's motivation is coming from :



If heuristics are turned on we can click on the motivation values of each of the generators, listed at the bottom of this panel, to see in more detail where why these motivation values are so high (or low). This opens up a smaller panel immediately below the first:


As a rule "child" nodes always have a motivation that is equal to or less than their "parent" (a node is another node's parent if it generates this other node). The easiest way to trace a child's motivation back to its parent or a parent's motivation to its children is to activate "auto-filter". This mode hides all the nodes apart from those connected to the currently-selected node:



That's all for now, but with any luck we'll have Jhell here soon to talk about diplomacy

Updated 7 years ago.
0Send private message
6 years ago
Mar 13, 2018, 3:01:00 AM

Ummm...I'm late to the party.


But I think, with this AI tool, Chronicles, support of their gamers, allowing their gamer's input ...


Amplitude has just taken my top ranking for best strategy games developer - replacing Paradox, which replaced GPG, which replaced Relic. Creative Assembly and Firaxis have always been just outside that list.

0Send private message
6 years ago
Mar 5, 2018, 8:34:33 AM

I wish there was a way to have the AI examine the player's "state" as if it was another AI in a way we can see. This way we can compare For example a top player with the reccomendations of the AI every turn if he was playing in his stead. That way we can perhaps be able to adjust the Ai's measurments that are avialbale to us to push its behaviour towarsds a better and more competetive one. 

Obviouslty the tools the AI has are insuffecient to make good calculated sense-making judgemtns at the same level of a top human player but we might, by observing its descision making in the shoes of a top player, adjust the AI's parameters in a way that might not make sense within its own limited systems that judges the game state, but would none the less bring the AI to play better. 

What I mean is that some parameter changes to the AI's behaviour might be considered weak choices within its own internal calculations but would none the less make it a better player in  an intuitive player controlled way.

We would manually adjust its levelrs and parameters so that when it examines the game state of a top player every turn, it would make descisions that are closer to the ones a top player makes.

0Send private message
7 years ago
Sep 26, 2017, 9:59:37 AM

You just have to use -enablemoddingtools, which disables achievements, but it works.

0Send private message
7 years ago
Sep 13, 2017, 11:35:25 PM

Is the debug tool still working or has it been abandoned? :3 I thought it was a really unique tool to learn how AI thinking works while also being relative to the game.

0Send private message
0Send private message
7 years ago
Jun 7, 2017, 10:09:14 AM

I dug around the issue and discover that it is not working for now :s, I'll fix that as soon as possible.

I'll answer on this topic as soon as E.N.F.E.R is reactivated.


Sorry for the inconvenience.

Updated 7 years ago.
0Send private message
0Send private message
7 years ago
May 28, 2017, 3:00:57 PM

To much for me I just play the game....I guess. But it could be profitble to safe it anyways.

0Send private message
0Send private message
7 years ago
May 28, 2017, 9:58:05 AM
Tichau wrote:

Hello


Sorry to not telling you about the changes we made in the release note. We deactivate the tool that allows us to watch Enfer brain by default since it has an impact on game performances.

To activate it you must add the option --enablemoddingtools.

To do that, go the game properties in steam. Right Clic -> Properties.

Then in the General tab click on "Set Launch Options..." and enter --enablemoddingtools.


This should activate the AI tool (and other cool stuf :) ).


Note that the Enfer tool is also deactivated in multiplayer games since it allows you to watch a lot of information about your opponents.



Hi


I did this but still nothing on localhost:4377.  Any ideas?  Do I need to start a new game instead of existing?


[edit]

tried with new game, still nothing.  There is nothing running on port 4377 according to netstat


Updated 7 years ago.
0Send private message
0Send private message
7 years ago
May 26, 2017, 8:15:27 AM

Hello


Sorry to not telling you about the changes we made in the release note. We deactivate the tool that allows us to watch Enfer brain by default since it has an impact on game performances.

To activate it you must add the option --enablemoddingtools.

To do that, go the game properties in steam. Right Clic -> Properties.

Then in the General tab click on "Set Launch Options..." and enter --enablemoddingtools.


This should activate the AI tool (and other cool stuf :) ).


Note that the Enfer tool is also deactivated in multiplayer games since it allows you to watch a lot of information about your opponents.



Updated 7 years ago.
0Send private message
7 years ago
May 24, 2017, 4:16:20 PM

So game is out and I can't seem to get into Enfer, and judging by a few posts, others can't either. What's up?

0Send private message
7 years ago
May 15, 2017, 10:59:04 AM

That is something you should expect ^^ If you let the Internet do something like that, you should expect to see it ruined ^^ like that googlebot ^^


0Send private message
7 years ago
Apr 26, 2017, 1:42:16 AM

W is the only new letter I've found, in the loading screen for the knowledge base.


Looks like we'll be updated at 36% knowledge defined.

0Send private message
7 years ago
Apr 20, 2017, 3:32:39 PM

Hi guys!


In case you missed the stream, here's a quick overview of the new AI debug tools, which we're opening up for all of you to play around with


Once you've launched Endless Space 2 you can access the tool through a web browser by typing localhost:4377 into the address bar:



Note that you need to be in-game (not in the game menu) and that you'll need to wait for about 10 seconds for the debug server to start up. If you're still in the menu or too quick on the draw you'll get an error  Also, while it should work on all browsers, we recommend using Chrome or Firefox as we've not really tested it anywhere else. Mobile devices aren't going to cut it either, sorry


Anyway if everything worked out you should find yourself on a web page that looks like this:



 Very important: the debugger will not refresh automatically when you end your turn: each time you want to take a fresh peek at the AI's brain you'll need to force the browser to refresh the page by pressing F5. We've done this on purpose so that we can keep a snapshot of the AI's previous state in one tab well taking a look at the new state in another


 Equally important: There are two things you're going to want to do straight away. First select an empire which has its execution mode set to "full", as for obvious reasons there isn't going to be much to look at if you examine the (non-existent) AI of an empire controlled by a human player. For instance you can click on the hyperlink marked "Major Empire 1" in the list of empires:



Next you're going to want to enable the heuristics using the toggle in the top right-hand corner of the screen. This will slow the game down but will give you a lot more information about what the AI is thinking! Once you've hit the toggle you'll need to press the synchronise  button just to the left of the toggle - this will force the AI to refresh based on this new configuration:



At the top of the screen are a series of tabs that correspond to the various stages in the AI's decision process:




In brief:

  • The "Debug" tab contains technical and profiling tools.
  • The "Snapshots" tab contains a summary of all the data that the AI has received from the game.
  • The "Analysis" tab contains a set of enriched data that the AI generates based on this raw game-state.
  • The "Decision" tab contains tools for debugging what the AI has actually decided to do based on this information - more on this later
  • The "Actuators" tab shows information on how the AI is carrying out its chosen objectives. 

The place where you're probably going to want to spend most of your time is the decision graph, which you can access through the "decision" tab:



You should end up on a page that looks like this (it may take a little while to load depending on how far along the game is):



Yeah, I know


We'll be discussing in a little more detail how this all works soon, for now suffice it to say that this is "where the magic happens" 


Have fun

Updated 7 years ago.
0Send private message
7 years ago
Apr 20, 2017, 4:09:29 PM

Hey, jhell here, hijacking Will's post :)


First of all let me start by saying that exploring the Diplomacy part of the AI can lead to "spoilers" of sorts, as you'll see any behaviour it could adopt ; and we've designed a few of them to be just that, surprises (at least on your first playthroughs). Now you can dive in there informed :).


Start by going here:


You then end up here:


This screen is a summary of all your relations (as Empire0, pink) with the other empires in the game. The table with IDs and duration is what we call "RelationLogs", and tracks what happened between you and that person. If we take this line for example :



It means that we have been in a "medium duration" Peace with Empire1 (blue) for 3 turns. These logs are used for us to trigger transitions between behavioral states in the diplomatic state-machine. Speaking of which! To access the behaviour itself, you'll have to click this button, for a given empire:



You'll then be taken there (right-click -> open image in new tab to see it bigger):



Now this is a messy state-machine. The algorithm to automatically place nodes and arrows is apparently quite complicated (I'm quoting the devs here ^^'), and we could only do so much, so the states need to be hand-placed so that the HSM (Hierarchical State Machine) looks legible. You can try to reproduce this model (this is the dev version, so you might be missing some nodes/arrows ; that's ok):



It's very small, but basically you have the 4 big boxes (from left to right, top to bottom):

- Cold war

- War

- Peace

- Alliance


Here we are looking over our relation with Empire1, and as we saw previously, we're at peace, hence the big blue highlight on the Peace box. If we zoom in:



We can see that inside the big Peace state, we are in Propose Agreement state, and inside this state, in the Ask Science Agreement state. This state can be read as "Empire0 (pink) will propose a science agreement to Empire1 (blue) as soon as it has enough influence to do so".


Now we can also see some black and red arrows (= transitions between states) on the graph, and you might also see blue ones. This goes as:

- Black: the transition hasn't been tested

- Red: the transition has been tested and is false

- Blue: the transition has been tested and is true, so it has been taken


You can click on a red or blue arrow to obtain more information on the tests being made (it gets highlighted in orange):



A transition has to return true or false. We make a bunch of "boolean" tests (true or false) with "and" (&&) and "or" (||) operators. The above can be read as is:

- Base value is used to initialize the transition and can be safely ignored (its value depends on the first test made on it for those who are curious)

- Has 1 turn elapsed?

- Did we enjoy a long science agreement?


This last test is itself divided into 2 sub-tests:

- Do we have a medium science agreement relation log?

- OR do we have a long science agreement relation log?


The true and false values are then read from the game. Most of the transitions use relation logs for their tests, so you can also check their presence in the table we saw previously.


What you should know is that there is a hierarchy to which transitions are tested first. Basically, the bigger boxes have priority over the smaller ones ; if a transition from a big box is valid, it's taken, and we ignore any other valid transition that goes from smaller states.


The last feature we wanted to tell you about is what we tried to show you during the stream: you can force the AI to go into a state. This is useful for test purposes or just to mess with things, but be careful, status has to be consistent (if you force the AI in a peace behavioral state whereas it's in cold war, it will automatically go back to cold war: the exit transition from peace will indeed be valid!)



You then need to make the AI think again so it knows it has changed state, so click this button in the top bar:  and then hit the Refresh button of the graph (or your browser):


And tadaaa! Your AI should now be in the new state. You can also see that the tested transitions have changed:



This pretty much covers it :). If any of you guys shows interest and has more questions, don't hesitate to ping Wilbefast or me, we'll be happy to help where we can.


Thanks for reading,



Updated 7 years ago.
0Send private message
7 years ago
Apr 20, 2017, 4:34:02 PM

Quick note to say that this is awesome and that your beard is glorious. 


That is all.

0Send private message
0Send private message
?

Click here to login

Reply
Comment
0Send private message