Some simulator-related information

@Vettax are you trying to perhaps store a variable in this that might conflict with internal game variables? Currently the API protection layer won’t let you do that, but it’ll fail silently until I can improve it. Changing the name of the variable might help.

About the variable stored, I found my mistake (the condition to fill vars was incorrect). What troubles me is that when I wrote :
var base = this;

The hoover can show me :
base.previous_Health
but
this.previous_Health
is showned as undefined.

But it’s working.

About the ranking, still some problems. Both on ogre and human side (with the same code). Still a lot of defeat that are victories when I watched them.

I’ll track the hover debugger issue over here.

Hmm, I see the same thing with your games, but I don’t see it with other players’ games. Anyone else seeing disagreements between simulation and playback?

not a good news (for me :slight_smile: )
Don’t know it it could help, but I play more with the dungeon arena level. Just after started Greed, I tried my previous code on dungeon arena, and it had disapeared. I was back to starting point.
hopefully, today, it seems back. But I was wondering if it could be possible that the ranking use a basic standard code, instead of mine (that could match with the ranking I have).

If any of them were against me (NovaHorizon) it probably was a code change. For some reason, every time I change my code, my best ranking falls xD … I think I need to drop most of my fancy stuff and go with basics again.

Don"t know if you change something, but it’s better now.
My rank is far better, with more victories. I’ll check more in details.

I also see disagreements between simulation and playback. See: Greed: Getting different outcome than written in ladder for my code when viewing the match

It still happens, even after I resubmitted the code

1 Like

I thought the problem was gone, it was really better yesterday.
But today, it’s back, still a lot lot of wrong results.

As I enter in the top 10, I suppose the problem is solved :slight_smile:

Haha @Vettax is it actually solved?

At least the situation is far far better.
I still have strange results. But as there is less defeat, it’s more difficult to find problems. It’s less evident. I wait for to find really evident problem.
I have to correct a bug in my code, and I will do a full test on all defeat to check them.

Edit : in fact, not sure it’s a bug in my code. The debugger reports me strange values :
If I hover on this : I saw 5 peasant and 1 librarian in the built object.
If I hover on this.build : 5 names only (the peasants).
If I hover on thie.build.length : value = 6

This librarian is not on the grid, and never appear. So the wrong reported values false my code.
After few loops, it’s worse : I’ve got two more soldiers, and no one on the grid or on the screen showing the troups. (screenshots all taken in pause at the same time). Normally, these troups were not resquested to build (only the peasants)



Maybe I could have created another post, but maybe it’s linked with the problem I encountered in ranking.
Maybe it’s also linked with the bug :created vars in “this” are not reported in the debugger (very annoying in some cases).

An example of match won (even if tryed multiple times to change random stuff), but reported in ranking with a defeat (don’t know if it’s possible to report a match like this, but I tried, it’s against DrMonky).:

It’s difficult to be sure, as maybe the other player change his code.
Edit : he changed his code :slight_smile:

Try again now–the random seed behavior was not correct for the past few days. I think that would have caused the problems you just described.

At this time, result in simulation matches result in ranking.
So the problem is solved.
(but the seed for random items seems always the same, compare to few hours ago, a new bug ? or a bug removed ?)

The seed should be the same for a given opponent pairing, but different between opponents, right?

Possible, yes. For a given opponent, yes it’s the same. But it was not the case before : it changed each time I changed my code, or I reloaded the page.
I don’t check if it’s the same for different opponent.

The avantage is that we can really see the impact of our code changes.
The inconvénient is that it’s difficult to check if the code is robust or not.
Is there a way to force a new seed ? Calling random() at the beginning of the code ?

Yes, you can call Math.random() in your code to affect the random seed thereafter.

Works great, thanks.

I left my laptop for night simulations, and in a morning find out simulation page crashed
win 7 x64
FF 51

this is first time yet