CGBenchmark tool

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.

9 Likes

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).

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

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

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.

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

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.

1 Like

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.

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.

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

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

1 Like

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

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.

3 Likes

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

1 Like

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

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

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 !

1 Like

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

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.

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