CGBenchmark tool


#1

Hi,

I made this tool that allows you to benchmark your multiplayer codes.
Feel free to give it a try and let me know if you have features ideas.

Thanks.

EDIT 1.0.1 released. The tool can now login by itself, check the description on github for updated configuration format.


#2

Nice stuff. It's sad that the tool does not login by itself. But i fear i may be very difficult to accomplish (i suspect some oAuth2 since we can log with google or facebook).


#3

Just grab the cookies from Chrome directly. That's what my own benchmark tool does... :stuck_out_tongue:


#4

wow. You can do that ? I never tried. There's no encryption ?


#5

Yes there is encryption provided by the OS on user level, which means you can decrypt it as long as the program is running under the same account.


#6

Disturbing. You are telling me that any program i launch can read my chrome cookies and play with it ?


#7

In the end that's something that you must do only once a year (CG cookie expires after 1 year atm). It's not that painful.
But I'll keep this idea in my mind and give it a look.


#8

Any program you launch can do the same thing as any other program you launch, so read documents, search history, downloads, etc. until UAC is involved. Not sure how that's disturbing or surprising, really. Windows (and Linux) doesn't have sandboxing as it is not a closed ecosystem like Apple's or Google's, despite Microsoft trying really hard with UWP. I'm actually happy it's (still) that way.

I might have missed something but from what I've seen that's not true. Your session cookie expires after your browser is closed, after which you will need to login again.


#9

Well I've been using this tool since 8 or 9 months on several multis and during every contest since then, and I've only had to change my configured cookie once.


#10

That's weird. If I close Chrome completely I have to login again to CG every time. Maybe something is fishy in the backend...


#11

No need to fiddle with cookies, you can just login via API by sending a POST with username/password to a specific URL.


#12

The pull request feature is your friend :slight_smile:
I'll give it a look anyway.
Thanks


#13

I just released version 1.0.1 :

You no longer have to manually retrieve the cookie and the IDE-session-id. You just need to put your login/pwd in the configuration and the tool will retrieve all that by itself.
The configuration is now faster and simpler.

Neumann.


#14

Marchete told me about a login issue.
It is now fixed.


#15

Small update : the tool detects when your AI crashes, and that information is displayed in the reports.


#16

Another small update : draw support and separated winrate for P1/P2.


#17

Hi,

I just pushed some new features :

  • CGBenchmark now supports 1vN games
  • You can now define a N enemies pool for each code configuration. Enemies will be picked randomly at each game (as well as their number, which will be a random value between minEnemiesNumber and maxEnemiesNumber). These random choices are deterministic, i.e. if you benchmark two codes with the same enemies configuration and a fixed seed list, each seed will be played against the same enemies every time.

You can benchmark the sh** out of MM :slight_smile:

Feel free to report bugs/feature ideas/comments !


#18

Woops, there was a bug in the random enemy choice, which wasn't deterministic.. Now fixed !


#19

Update :

playerPosition now generates every starting positions configuration, according to player number (2 permutations in 1v1, 6 in 1v2 and 24 in 1v3). See comments in configuration file for detailed explanations.


#20

Update :

  • You can pause/resume a running benchmark by pressing ENTER
  • Logs of every game are saved in a logs folder (can be disabled)

Thanks egaetan