Introducing CG Spunk

Confirmed. Thanks. Issue #56.

  • danBhentschel
1 Like

Version 0.2.12 has been published to the Chrome Web Store and should be rolling out to clients now. Other than some minor ground work to pave the way for a Firefox and an Edge version (not yet available) the only change is a fix for Issue #56.

  • danBhentschel
1 Like

FYI… Version 0.2.13 of CG Spunk has been submitted to Mozilla and is awaiting approval. Since Mozilla approval is a manual process, it’s hard to know exactly how long it will take. CG Spunk is currently in queue position 248 of 282 after a few days of waiting.

If you want to test it out for yourself, you can load it as an unsigned add-on by downloading Firefox Developer Edition and then following the instructions in this FAQ (What are my options if I want to install unsigned extensions in Firefox?) The Firefox add-on can be found here:

https://addons.mozilla.org/en-US/firefox/addon/cg-spunk/

  • danBhentschel
3 Likes

Thanks for all the work you’ve done on this… your tool is indispensable for all us bot programming fans.

6 Likes

Version 0.2.14 has been published to the Chrome Web Store and should be rolling out to clients now. It has also been published to Mozilla, though it’s still unsigned at this point (203 / 264 in the review queue). Changes in 0.2.14 include:

  • Issue #6 - Add a stop button to the results screen (don’t remember who requested this)
  • Issue #57 - Add error / exception information to the summary area of the results screen (requested by @Tiramon)
  • BONUS - All run / match references in the summary area are now links to the appropriate row in the results table
  • Issue #46 - Replace the STDERR screen with a new Game log screen (requested by @Cyberpunk)

This Game log screen is customizable to show the game information that you are interested in. NOTE that the stdin information is not provided in the CG APIs (that I know of) and so you will need to put it into your stderr output in the following format:

IN
stdin content (as read from stdin) should be echoed here
/IN
stderr content can go after the IN /IN pair.

If you format your stdin inside the stderr following this format, then CG Spunk will detect it and display it properly on the Game log screen.

  • danBhentschel
2 Likes

Version 0.2.15 has just been published to both Chrome and Firefox (still unsigned… 187 in the queue). It fixes Issue #59, pointed out by @Tiramon. Thanks!

  • danBhentschel

Version 0.2.16 has just been published to both Chrome and Firefox (still unsigned… 185 in the queue). It “fixes” Issue #62.

This is likely to be a controversial change to the extension. I recommend you read the Issue text. Here is a summary:

@_CG_Maxime has requested that I put a delay between matches to reduce the load on the server. At some unspecified point in the future (soon?) CG will enforce a limit to number of matches played within a certain time period. It’s unclear at this time what is a suitable delay, and so I have made the value (for now) fully configurable, with a default of 30 seconds. In the future, I may enforce a minimum delay, or just hardcode a fixed delay value. We’ll see where this goes. :slight_smile:

Also note, once the extension updates to v0.2.16, it will initially be disabled because I have added a new required permision: Display notifications. You will need to accept this new permission before it will work again.

  • danBhentschel
1 Like

I guess it was unavoidable given the popularity of the tool.

Hi, I love what you’re doing with CG Spunk, moreover these changes were definitely needed!
But what about the other new permissions:

  • especially, is reading my browsing history a real need for CG Spunk ?

I knew this question would come up. :slight_smile: I’ve actually hit it before with other extensions I’ve written.

That “permission” was always there. It isn’t new with this version, and it comes when I use the chrome.tabs API. You can see all the “special” APIs that I’m using in the manifest.json file (in the “permissions” section).

It can be challenging to do much of anything in a Chrome extension without using chrome.tabs in some fashion. It’s pretty much the general purpose API, and it has a horribly labeled (to the user) permission: “Read your browsing history”???

It actually doesn’t give the extension the ability to peruse your history. That functionality comes through the chrome.history API, which I am NOT using. You can see a (one of many) discussion on the misleading wording of this permission here:

https://bugs.chromium.org/p/chromium/issues/detail?id=429185

Thanks for keeping me honest. :wink:

  • danBhentschel
3 Likes

Thank you for all this additional information, I don’t know much about those APIs, that’s why It immediately caught all my attention :slight_smile:

Thank you again for your great work and your reactivity to answer :slight_smile:

Thank you player_one for the modification. We like CG Spunk and we don’t want to block it, but if such a tool become popular it may degrade the user experience for everyone. A delay sounds like a good solution to avoid flooding continuously the plays. Be careful, there are several quotas (for 1 minute, 5 minutes and 15 minutes), so if you reduce that delay too much you may be blocked for the next 15 minutes.

1 Like

I think asking to ‘play nice’ with very vague indications as to what you are actually allowed to do is counter-productive for everyone. Please be more transparent and give real numbers on the ‘quota’ everyone is allowed to use. I am aware you are experimenting and probably tweaking them still, but keep us updated and we will adjust accordingly.

As it stands, the arbitrary 30 seconds put by default will make getting results on GitC take 5 times as long as before, which is a huge deal. Even if player_one enforces a minimum limit without configuration, as a community of developers it will be a piece of cake to fork the code and remove it.

It is already difficult enough to have good information on the impact of your changes when you reach the top 20. Limiting the ability to do so on top of having to guess how much we can actually get away with is too much.

There has to be a better solution.

As explained here, CG Spunk uses the play service call to compute the battles. The problem is that these plays are computed with the highest priority which has two consequences:

  • these battles have a higher priority than the battles used to rank the users: when you use CG Spunk you slow down the computation time of the battles in the arena. That’s not fair.
  • if there are too many plays, people will have to wait for each play and it might even fail if it’s too long.

The battles computed by CG Spunk should have the same priority that the ones computed in the arena. That’s not currently possible and we don’t have the time to implement that before the end of the contest.

The strictest limit should be 50 plays in 15 minutes (but we may reduce this value), which is a play every 18 seconds during 15 minutes.

3 Likes

Thanks for the explanation! I understand the reasoning for the limit due to how the servers operate right now. I was much more concerned we had to guess how much was enough and possibly take a 15 minutes timeout if we end up guessing wrong, which is really detrimential at this stage of the contest. With the numbers you provide it will be much more fair, so thanks!

1 Like

two consequences:

I see a third consequence. If players develop their AI locally without the need to push them on the leaderboard, then many hidden AIs improvements will pop-up at the end of the contest.

I won’t make a strong case for it, but I appreciate that before CG Spunk it was possible to see people pushing their AIs even when they tried to keep everything hidden.

CG Spunk is an amazing tool outside of contests, it just doesn’t feel right to allow it in contests.

The problem is that the arena during a contest only gives you 100 games. So you’ll play … 5 games against each player in the top 10 ? Well, better write an AI with a random() and pray.

The reason because many players use CG Spunk is because it’s currently the only way to really test your AI against the players around your rank in the arena. We just have no other choice.

If tomorrow Codingame add the possibility to do a 1000 games submit, CG spunk will be useless.

1 Like

A game can last 20 seconds (for this contest), 1000 games requires a total of 5 hours of computing. There are approximatively 80 processors available for the computation of the games. With more than 3000 players, it’s not possible right now…

However, we will add more battles for the legend league.

1 Like

Version 0.2.18 has just been published to both Chrome and Firefox (still unsigned… 116 in the queue).

Fixes a couple of bugs:

  • Issue #61: The extension will now continue to work (somewhat) through an update from the Chrome Web Store, without needing to refresh the CG tab. This is only in effect for upgrades beyond v0.2.18, though.
  • Issue #64: Bug that caused some log files to not be displayed

And a couple new features:

  • Issue #60: Summary of games won / lost against opponents ranked above / below me in the arena, requested by @Bob14

  • Issue #65: Show the CG Spunk Log dialog box whenever playing a multiplayer game from the IDE. This behavior can be disabled in the extension’s Options screen.

  • danBhentschel

1 Like

Version 0.2.19 has just been published for Chrome. Note that I have not updated Firefox with this change yet. The new behavior doesn’t work very well on FF, and I don’t have time to debug it right now.

So after using it for a while, I’ve decided that the auto-opening log window is too annoying. In particular, I don’t like how it keeps opening new windows on various locations on my screen. Sooo…

I fixed it! The log window will now close and re-open when doing a new Play operation from the IDE, and it will remember previous size, location, and option selections.

Issue #69: Close and re-open game log window when clicking Play from the IDE

  • danBhentschel
1 Like