Mages Might Ranking

Decided to play some Mages Might for fun, and wrote what I think is an ok-ish AI.
When I rank the game however, I end up with nearly all losses.
What confuses me is that when I then go to look at how I lost, by clicking on the battle link, I win almost every battle that gets ranked as lost or tied.
I’m really confused by how the ranking results work, as it should give the same results as when I run it individually, and because of this, I can’t improve my AI since I’m not able to see how it loses/what is wrong.
Here are example screenshots of what I mean.


Screenshot 2021-07-10 151920

The simulated results can be different for a number of reasons, including:
a) Different distribution of mana fruit,
b) Different behavior of your code (or your opponent’s) depending on whether you are red or blue

One thing that could be helpful is to see your matches in “Spectate” mode. This is done by clicking the “eyeball” column on the leaderboard next to the two players whose match you want to spectate, and then clicking the “Spectate” button. This lets you watch how the matches play out when you’re Blue.

Ah interesting. My code seems to not run at all when blue.
Are there any known bugs/issues that cause this?
My code should be fully independent of the color (although it clearly isn’t).
Another question is what are the exact differences between red and blue (other than x-y position)? My understanding was that playing as either is identical.

In theory it should only be positions that differ, but there has been at least one bug in the past where a property was only available to one color. I am not aware of any standing bugs of this type.

Hm, interesting.
I’ll just try to debug it as best I can (why is there no debug option or console ahhhhhhhhhhhhhhhhhhhhhhhhhh), and once I find out what was causing the issue I’ll just post the solution and close the thread.

Ah thanks, didn’t think of that.
I’ve also finally found my issue.
It would appear that calling hero.findEnnemyMissiles() as blue breaks the code.
Removing that lands me about where I expected (although some matches still appear to have issues, as I win when red and lose when submitting)
Rather inconvenient though, as part of my code relies on that function, but there are ways around it.

Interesting, I was confident that method wasn’t allowed. Checking the editor it’s been enabled for red and not blue.

@Chaboi_3000 intended? Trivializes prediction which I would assume most top players have implemented some form of.

1 Like

Thanks for the report. It’s 100% a bug. I will self-assign this and work to find a fix :+1:

Seemed like findMyMissiles() and findEnemyMissiles() were missing for Blue players. I just pushed a fix.

Awesome.
I will say though, I do agree with @Hydrobolic’s take on the matter.
I originally thought more complex predictions were the only way to go about it, while this command makes a huge amount of data available for little work.
Although out of scope for this discussion, I think it would be better if this method was removed entirely, helping to add a bit of complexity to the game.
Even though this game is directed towards very young children, I have spent the past few weeks using this as a CS project, which the kids like a lot (because of the competitive element), and working on predictions was part of that.
Regardless, thanks for the quick fix!

I’ll ask Bryukh about whether or not to remove them. The most important part is getting Sorcerer’s Blitz(Championship) working smoothly as possible, so if you have any feedback or happen to find any issues with Mage’s Might, please report them!

Uh what’s mages might?

It’s a level. Multiplayer arena.

Although out of scope for this discussion, I think it would be better if this method was removed entirely, helping to add a bit of complexity to the game.

I agree. Blazing Battle had basically no strategy; doing well involved a hand-tweaked mess that happens to counter what most people’s code looked like at the time.

As a reminder, Blazing Battle is designed to be playable by our CS1 students, so it’s obviously very simple. CS1 only covers the basic dungeon concepts such as basic syntax and while loops.

A well-built game can absolutely have a low barrier of entry and still room for plenty of strategy. Blazing Battle had just the first. Mages Might currently has some of both.

Okay, minor update the the thread here, as it’s related to the initial question.
In my simulated matches against Ellenion, we tie both as red and as blue, as we both deal the exact same amount of damage to each other.
My understanding is that this should be counted as a tie, but it is counted as a loss in ranking matches.
Is there some mechanic I am missing that acts as a tie-breaker, or is the tying system currently broken ? (I used to see ties appear, but no longer do at all).
EDIT:
In my matches against IOI-ZAF2-JW, I clearly win both red and blue matches when spectating, yet it is also counted as a loss in the ranking matches.
EDIT again:
Tried spectating without being logged in, I win against IOI-ZAF2-JW when red, but lose when blue.
Ignoring the weirdness of that (both positions should be identical), the simulation doesn’t seem to be consistent.
I also lose against Ellenion when spectating while logged out.
Any ideas on why this would be the case?