freeorion icon indicating copy to clipboard operation
freeorion copied to clipboard

Add analytics

Open Cjkjvfnby opened this issue 3 years ago • 5 comments

Looks like it is easy to measure AI by collecting issued orders. You don't need to touch actual code. Here is a sample PR with code.

Now I print only minimum information (order count). Later we could build a more sophisticated framework on top of it.

Here is a sample output.

Issuing orders analytics for turn 6
=======================================================
| Order                     | Issued | Failed | Total |
=======================================================
| AdoptPolicy               |        |        |       |
| Aggression                |        |        |     6 |
| AllowStockpileProduction  |      1 |        |     6 |
| Bombard                   |        |        |       |
| ChangeFocus               |      2 |        |    13 |
| ChangeProductionQuantity  |        |        |       |
| Colonize                  |        |        |       |
| CreateShipDesign          |        |        |     1 |
| DeadoptPolicy             |        |        |       |
| DequeueProduction         |        |        |       |
| DequeueTech               |        |        |       |
| EnqueueBuildingProduction |        |        |     1 |
| EnqueueShipProduction     |        |        |     3 |
| EnqueueTech               |        |        |   140 |
| FleetMove                 |      3 |        |    18 |
| FleetTransfer             |        |        |       |
| GiveObjectToEmpire        |        |        |       |
| Invade                    |        |        |       |
| NewFleet                  |        |        |       |
| PauseProduction           |        |        |       |
| Rename                    |        |        |     1 |
| RequeueProduction         |        |        |     1 |
| Scrap                     |        |        |       |
=======================================================
|                           |      6 |      0 |   190 |
=======================================================

Cjkjvfnby avatar Jun 02 '21 20:06 Cjkjvfnby

What do I*, F*, Turn*, and Total* indicate?

geoffthemedio avatar Jul 31 '21 07:07 geoffthemedio

What do I*, F*, Turn*, and Total* indicate?

  • Issued succesfuly this turn
  • Failed this turn
  • Total this turn
  • Total for the current session

* are added at the table bottom with full names, I just forget to include them to the sample.

I have aready simplified this table a bit, but haven't test this code yet.

Cjkjvfnby avatar Jul 31 '21 15:07 Cjkjvfnby

Could have impact in diplomacy relations...

hifron avatar Jan 14 '22 10:01 hifron

@Cjkjvfnby what is the status of this?

geoffthemedio avatar Jan 14 '22 10:01 geoffthemedio

Could have impact in diplomacy relations...

It should not, it just counts issues ordered.

what is the status of this?

Draft. This looks like a promising way to measure AI performance.

Cjkjvfnby avatar Jan 15 '22 21:01 Cjkjvfnby

This PR is outdated, closing it.

Cjkjvfnby avatar Oct 09 '22 13:10 Cjkjvfnby