Trouble with map hashes learning (GhostMap feature)

Trouble with map hashes learning (GhostMap feature)

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Trouble with map hashes learning (GhostMap feature)

Post by Forboding Angel »

Learnmaps appears to be completely broken.
[5:51:35 PM]
EvoRTSDedicated1
********** Help for command learnmaps **********
[5:51:35 PM]
Syntax:
[5:51:35 PM]
!learnMaps [<mapFilter> [<hostFilter>]] - learns map hashes from other battles (only learns maps matching <mapFilter> and <hostFilters> if specified)
[5:51:35 PM]
Example(s):
[5:51:35 PM]
"!learnMaps" learns all maps hosted currently that aren't locally available
[5:51:35 PM]
"!learnMaps delta" learns all the maps hosted currently that contain "delta" in their name
[5:51:35 PM]
"!learnMaps . spads" learns all the maps hosted currently by players containing "spads" in their name
[5:54:00 PM]
[Evo]Forboding_Angel
!learnmaps desert
[5:54:01 PM]
EvoRTSDedicated1
Unable to find new maps matching map filter "desert" in currently hosted maps
[5:54:16 PM]
[Evo]Forboding_Angel
!learnmaps Desert
[5:54:16 PM]
EvoRTSDedicated1
Unable to find new maps matching map filter "Desert" in currently hosted maps
[5:54:26 PM]
[Evo]Forboding_Angel
!learnmaps needle
[5:54:26 PM]
EvoRTSDedicated1
Unable to find new maps matching map filter "needle" in currently hosted maps
[5:54:53 PM]
[Evo]Forboding_Angel
!learnmaps Wolfram1
[5:54:54 PM]
EvoRTSDedicated1
Unable to find new maps matching map filter "Wolfram1" in currently hosted maps
[5:55:01 PM]
[Evo]Forboding_Angel
!learnmaps . Wolfram1
[5:55:02 PM]
EvoRTSDedicated1
Unable to find new maps matching map filter "." and host filter "Wolfram1" in currently hosted maps
[5:55:12 PM]
[Evo]Forboding_Angel
!learnmaps desert Wolfram1
[5:55:12 PM]
EvoRTSDedicated1
Unable to find new maps matching map filter "desert" and host filter "Wolfram1" in currently hosted maps
Image

The evo hosts all use allowghostmaps true.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

Forboding Angel wrote:Learnmaps appears to be completely broken.
No it's not. You are trying to make SPADS learn map hashes from Springie hosts, but Springie doesn't use in-lobby sync checks: Springie only broadcasts 0 as hash for any map, making it impossible for clients to check sync before game start, and also making it impossible for SPADS to learn hashes from it of course.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SPADS AutoHost beta release

Post by Forboding Angel »

Hmm good to know. Why doesn't spads use api.springfiles.com for maps?
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

Can you be more specific?

If you mean using api.springfiles.com to retrieve map hashes, afaik this API doesn't provide the hashes as returned by unitsync and as used in lobby protocol (these hashes depend on the Spring version in use), so it's not possible.

If you mean using api.springfiles.com to download spring archives on request from a command line interface, you can use pr-downloader directly which does exactly that afaik. SPADS isn't like a normal lobby client, which has a GUI and where users can click on a map to download it etc. So I see little use in reimplementing and maintaining a pr-downloader clone in SPADS.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: SPADS AutoHost beta release

Post by abma »

bibim wrote:Can you be more specific?

If you mean using api.springfiles.com to retrieve map hashes, afaik this API doesn't provide the hashes as returned by unitsync and as used in lobby protocol (these hashes depend on the Spring version in use), so it's not possible.
i didn't read all about that: is this needed? if so, it could be easily added as api.springfiles.com already uses unitsync to extract stuff.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

You mean Springfiles would store the hash of each map for all Spring versions (and a "springVersion" parameter would be added to current API)?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: SPADS AutoHost beta release

Post by abma »

bibim wrote:You mean Springfiles would store the hash of each map for all Spring versions (and a "springVersion" parameter would be added to current API)?
i guess "all" won't be possible, but for the stable releases it should be possible. nobody requested this feature till now. i thought hashes aren't needed for autohosts because they can set 0 (or what was it?) as hash...?!
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost beta release

Post by bibim »

Sending 0 as hash means disabling in-lobby sync check.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: SPADS AutoHost beta release

Post by dansan »

Maybe I'm totally wrong, then just ignore this posting...

Can this hash thing be a way to help players download the correct map in case of name clashes?

You know the situation, where players can download a map by rapid and http, and still not sync? I think it has to do with bad version handling in the map file... (?) .... If the autohost could produce a hash of its map and use it to search api.sf.com, then it could offer a correct http-link?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: SPADS AutoHost beta release

Post by abma »

dansan wrote:Can this hash thing be a way to help players download the correct map in case of name clashes?
hmm, depends. the problem is, that the hash includes the hash of all depending files (mostly base-content) as well. if the base-content is broken then this won't really help to find a correct map. also creating the hash is "expensive" as it requires a installation of spring (unitsync & basecontent basicly). this is why the hash of maps mostly changes when a new release is made.... this means, on every release all maps / games needs to be rehashed. also if remote site doesn't have the same spring version & hashed the content, you can't find the map/game, even if its available. this is why i used the "springname" for getting map/game. (-> higher success rate for downloads as using the hash)

see http://springrts.com/dl/LobbyProtocol/P ... TLE:client hashCode & mapHash

on springfiles the "springname" is unique so map/game duplicates shouldn't be a big problem, also unitsync can't handle duplicate names as well.

not sure how to solve this, calculating all hashes on server side each release doesn't sound good the more i think about it.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: SPADS AutoHost beta release

Post by Silentwings »

Imo the map-hash-name issue is best solved how its always been done - by releasing a 'new' map with a new version number/name & no conflict.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SPADS AutoHost

Post by Forboding Angel »

20131220174136 - NOTICE - [SPADS] Using dedicated Spring server binary
20131220174145 - NOTICE - [SpringAutoHostInterface] Listening on AutoHost port (127.0.0.1:8241)
20131220174145 - NOTICE - [SpringLobbyInterface] Connecting to lobby.springrts.com:8200
20131220174146 - NOTICE - [SPADS] Lobby server default engine is Spring 95, UnitSync is using Spring 95.0.1-196-gdf27b2b develop
20131220174146 - INFO - [SPADS] Logged on lobby server
20131220174146 - NOTICE - [SPADS] TrueSkill service available
20131220174146 - INFO - [SPADS] Channel evolution joined
20131220174147 - INFO - [SPADS] Channel weblobby joined
20131220174147 - INFO - [SPADS] Channel newbies joined
20131220174147 - INFO - [SPADS] Channel main joined
20131220174637 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220175138 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220175639 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220180140 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220180641 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220181142 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220181643 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220182144 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220182645 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220183146 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220183647 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
20131220184137 - INFO - [SPADS] File "C:/Users/PoolRoom/Documents/D Drive/spads/var/preferences.dat" dumped
20131220184137 - INFO - [SPADS] File "C:/Users/PoolRoom/Documents/D Drive/spads/var/mapHashes.dat" dumped
20131220184137 - INFO - [SPADS] File "C:/Users/PoolRoom/Documents/D Drive/spads/var/userData.dat" dumped
Ghostmaps is on... what is the deal? I have changed the location of where spring-dedicated.exe is located away from the spads folder, but that's all I have changed.

The map list file is default, I e all and *.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim »

Forboding Angel wrote:
[...]
20131220174637 - WARNING - [SPADS] Unable to find any other allowed map compatible with current number of players (0), keeping current map
[...]
Ghostmaps is on... what is the deal? I have changed the location of where spring-dedicated.exe is located away from the spads folder, but that's all I have changed.

The map list file is default, I e all and *.
What you changed is actually the Spring version used by your autohosts. As I explained you previously, the map hashes used in lobby protocol depend on the Spring version in use, so SPADS can only learn map hashes from hosts using same Spring version.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SPADS AutoHost

Post by Forboding Angel »

So in other words, because spring. Instead of using the map's actual hash, it runs it through unitsync and then returns the modified hash? What the hell for? That's really... How can the benefits of that possibly outweigh the sillyness (is it done to verify that the map is what it says it is?)?
Last edited by Forboding Angel on 22 Dec 2013, 07:38, edited 1 time in total.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SPADS AutoHost

Post by Forboding Angel »

I have the springie host running !setengine 95.0.1-196-gdf27b2b

Yet spads refuses to learn any maps from it, even after I deleted the maps data files from var (presumably so that they would have to be regenerated).
[10:30:33 PM]
[Evo]Forboding_Angel
!learnmaps
[10:30:33 PM]
*
EvoRTSDedicated2 * Unable to find new maps in currently hosted maps
[10:30:33 PM]
*
EvoRTSDedicated4 * Unable to find new maps in currently hosted maps
[10:30:33 PM]
*
EvoRTSDedicated5 * Unable to find new maps in currently hosted maps
[10:30:33 PM]
*
EvoRTSDedicated3 * Unable to find new maps in currently hosted maps
[10:30:33 PM]
*
EvoRTSDedicated1 * Unable to find new maps in currently hosted maps
[10:30:42 PM]
!learnmaps eye
[10:30:42 PM]
*
EvoRTSDedicated2 * Unable to find new maps matching map filter "eye" in currently hosted maps
[10:30:42 PM]
*
EvoRTSDedicated3 * Unable to find new maps matching map filter "eye" in currently hosted maps
[10:30:42 PM]
*
EvoRTSDedicated1 * Unable to find new maps matching map filter "eye" in currently hosted maps
[10:30:42 PM]
*
EvoRTSDedicated5 * Unable to find new maps matching map filter "eye" in currently hosted maps
[10:30:43 PM]
*
EvoRTSDedicated4 * Unable to find new maps matching map filter "eye" in currently hosted maps
Image
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim »

Forboding Angel wrote:Instead of using the map's actual hash, it runs it through unitsync and then returns the modified hash? What the hell for?
It is done this way to check that the map and its dependencies are available and the same on all client systems. And since maps depend on Spring base content, their unitsync hash may change between Spring versions.
Forboding Angel wrote:I have the springie host running !setengine 95.0.1-196-gdf27b2b

Yet spads refuses to learn any maps from it
You asked me exactly the same thing one month ago, please refer to what I already answered here.
Forboding Angel wrote:even after I deleted the maps data files from var (presumably so that they would have to be regenerated).
You don't need to do that, SPADS stores map hashes for each Spring version (however, if autoLearnMaps is enabled, it may be a good idea to purge this file every couple of years or so to avoid keeping obsolete data in memory).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SPADS AutoHost

Post by Forboding Angel »

Ahh, so I did. Probably because the way this is done doesn't make sense to me... At all.

So basically, the only way to learn any maps is to either host them all yourself individually, or to have another spads host running the exact same spring version who just happens to have all of the maps downloaded.

That's a lot of things just happening to go right...

Perhaps something a little bit more flexible could be done? At the moment my hosts are stuck on the one map that the server has, and the only real option I have is to host them locally and continually tell it to learnmaps, which kinda sucks.

Edit: HA, with weblobby I can't even do that because for self hosting it uses a springie spawn. Lovely.

Edit2: Spads can't learn maps from me self hosting (with the correct version of spring) using springlobby.


...
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim »

Forboding Angel wrote:So basically, the only way to learn any maps is to either host them all yourself individually, or to have another spads host running the exact same spring version who just happens to have all of the maps downloaded.
The maps learning feature of SPADS isn't meant to be used to learn all maps instantly. It is a system which should be used either manually to learn a few specific maps on demand, either automatically to learn all maps progressively from other hosts using same Spring version (any host respecting lobby protocol would work, not necessarily SPADS). Of course this doesn't work as well when you are the only one hosting a specific Spring version, because you can't learn the hashes from anyone else...
Forboding Angel wrote:Edit2: Spads can't learn maps from me self hosting (with the correct version of spring) using springlobby.

...
Hmm I think I know why, let me check this...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: SPADS AutoHost

Post by Forboding Angel »

bibim wrote:The maps learning feature of SPADS isn't meant to be used to learn all maps instantly.
Yep. That's why i was trying to target my own hosted game / map individually.

Unfortunately, this approach as a fairly fatal flaw (requires many other hosts like itself to fully propagate).
bibim wrote:
Forboding Angel wrote:Edit2: Spads can't learn maps from me self hosting (with the correct version of spring) using springlobby.

...
Hmm I think I know why, let me check this...
kk
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: SPADS AutoHost

Post by bibim »

Should be fixed in SPADS 0.11.17.

If you want to test, you just have to switch to unstable release by editing your spads.conf file and set autoUpdateRelease to "unstable" instead of "stable". Then, restart your EvoRTSDedicated1 autohost which will autoupdate. You can come back to stable release at any moment (for example when you have learned all the maps you need) by doing the reverse operation.
Post Reply

Return to “SPADS AutoHost”