Thanks for investigating
I could try to optimize things more, but when I have a response time under 1s in local, it is hard to be motivated by that.
Do you have an idea of how I can reach CG team to talk about Dart in the platform ?
I already posted on the forum that it needed an update of SDK, but there was no reaction from the team⦠And Iād like to discuss the compilation target and all with them, to understand whatās under the hood.
Thatās understandable. With local response times under 1s, I can imagine how hard it is to stay motivated to optimise further when the slowdown seems platform-specific.
As for reaching the team, Discord might be a better route. Theyāve mentioned that theyāll be focusing more on site development later this year, so thereās a better chance your suggestions will be seen and responded to.
Iād suggest posting in either the #feature-request or #bug-report channels. These channels should get more attention than other channels (and the forum) for this kind of issue.
I donāt code in Dart but I ported my python code to Dart and passed all validators. Though I did see timeouts and time fluctuations with cases 9x9 so you have a valid point here. There could be a problem with the server load, Iām just guessing.
Just to let you know that there are at least 2 published solutions in Dart besides mine. I would suggest using mutable globals and update before, make your recursive call, and finally reset after instead of creating new objects. The most important thing though is to choose the next empty cell based on a heuristic. What would you consider to be the next cell to try?
And one more thing just to clear things out in my previous comment I wasnāt suggesting using algorithm X nor dancing links like people mentioned above. Obviously you donāt need such complicated algorithms, actually I shouldnāt say complicated because Iāve never used algorithm X nor dancing links, I donāt even know what they do.
Thanks for your help !
I certainly could manage it with my own dedicated code, but I arrived here on this puzzle because I am following AlgorithmX playground and practicing/tweaking my DLX Solver.
The ānext cell to tryā is implicit by sorting in the Requirement columns by number of actions fullfilling that requirement, āfilling a cellā is indeed the only action I modeled here.
Saying the same thing differently, my DlxSolver always try first the columns that have the most constraints on them (aka the less possible values).
No problem, I donāt know the details of DLX but the logic sounds very similar to what Iāve done but I also presorted both cols and rows to speed up. I also applied a combined heuristic/constraint on both cols and rows and I think that made the difference on speed.