RBY Unofficial Patch
Moderator: Forum Moderators
RBY Unofficial Patch
Previous Title: "Issues with Random Faction/Hero in RBY No Mirror Era"
After playing many games 1v1 using RBY No Mirror era, I noticed that I seemed to get Orcs more than half the time, which seemed very odd. Later more experienced players told me that there seems to be some issues with RBY No Mirror randomness; in fact just based on what hero you recieve you can usually be sure of what hero your opponent has and that you shouldn't use this era on ladder for this reason.
Curious, I decided to test this while I was on the train, starting 50 local 1 v 1 games with RBY no mirror. Only 9 different hero matchups occurred in this test, and half of the games were Orcish Grunt vs Loyalist Bowman. I have not attempted to replicate this on other machines. (Detailed results below)
Later in a ladder match, Garetjax convinced Cackfiend that there was a problem by correctly guessing his faction and hero on turn 2 on Fallenstar Lake.
I decided to look at the code and see what was going on. The macros in RBY_Era.cfg use the wesnoth "rand" command to randomly sample factions, and draws new ones whenever a repeat occurs.
It seems that after 1.10 "rand" was known to have some issues, although I'm not sure if this was directly related. One of the suggested fixes seems be to replace rand with a lua alternative.
http://webcache.googleusercontent.com/s ... clnk&gl=us
In fact, Quetzalcoatl who (unless I am mistaken) maintains RBY addon noticed problems with the map selector using wesnoth rand, and in this post he says that he fixed it by translating it all to lua:
http://forums.wesnoth.org/viewtopic.php ... 7e#p517711
Alternatively, is there anyone who cannot replicate the results I got by starting 50 RBY Era games?
Thanks,
iceiceice
Edit: If this should be a reply to Quetzalcoatl's Rushed By Yetis thread rather than its own topic, sorry about that.
After playing many games 1v1 using RBY No Mirror era, I noticed that I seemed to get Orcs more than half the time, which seemed very odd. Later more experienced players told me that there seems to be some issues with RBY No Mirror randomness; in fact just based on what hero you recieve you can usually be sure of what hero your opponent has and that you shouldn't use this era on ladder for this reason.
Curious, I decided to test this while I was on the train, starting 50 local 1 v 1 games with RBY no mirror. Only 9 different hero matchups occurred in this test, and half of the games were Orcish Grunt vs Loyalist Bowman. I have not attempted to replicate this on other machines. (Detailed results below)
Later in a ladder match, Garetjax convinced Cackfiend that there was a problem by correctly guessing his faction and hero on turn 2 on Fallenstar Lake.
I decided to look at the code and see what was going on. The macros in RBY_Era.cfg use the wesnoth "rand" command to randomly sample factions, and draws new ones whenever a repeat occurs.
It seems that after 1.10 "rand" was known to have some issues, although I'm not sure if this was directly related. One of the suggested fixes seems be to replace rand with a lua alternative.
http://webcache.googleusercontent.com/s ... clnk&gl=us
In fact, Quetzalcoatl who (unless I am mistaken) maintains RBY addon noticed problems with the map selector using wesnoth rand, and in this post he says that he fixed it by translating it all to lua:
http://forums.wesnoth.org/viewtopic.php ... 7e#p517711
So what I would like to request is, can we get a version of RBY addon in which the faction / hero selection in RBY Era is also done using Lua math.random?1.10.9 - "RNG haters edition" is out
No more Wesnoth's random variables. After reciving about 10 times in a row same map from pool of 20 i decided to switch to Lua math.random .
Non technical explanation: RBY does not user Wesnoth's RNG anymore.
Cheers
Q
Alternatively, is there anyone who cannot replicate the results I got by starting 50 RBY Era games?
Thanks,
iceiceice
Results of 50 games:
Last edited by iceiceice on September 20th, 2013, 6:27 am, edited 1 time in total.
Re: RBY Unofficial Patch
I realized that since part of the add-on was already switched over to Lua it was actually very easy to hack up the code and switch the rest to Lua even without wesnoth dev experience.
Announcing...
RBY Unofficial Patch
This add-on creates a new era "RBY No Mirror Unofficial" which works almost the same as the old era except with (putatively) better randomness. It also fixes a bug which caused all the heroes to be randomized even if they weren't chosen as random.
Limited testing suggests that the matchups this generates are not nearly as predictable as the old version. I do not know whether or not there is some nastier correlation problem; the next time I am on the train I will collect some more significant data.
I am not a wesnoth dev nor have I made any add-ons before -- if for some reason this add-on does not work, crashes, or gives you bugs I definitely want to hear about it. Please use this patch and let me know if you have any problems or suggestions!
Thanks,
iceiceice
Announcing...
RBY Unofficial Patch
This add-on creates a new era "RBY No Mirror Unofficial" which works almost the same as the old era except with (putatively) better randomness. It also fixes a bug which caused all the heroes to be randomized even if they weren't chosen as random.
Limited testing suggests that the matchups this generates are not nearly as predictable as the old version. I do not know whether or not there is some nastier correlation problem; the next time I am on the train I will collect some more significant data.
I am not a wesnoth dev nor have I made any add-ons before -- if for some reason this add-on does not work, crashes, or gives you bugs I definitely want to hear about it. Please use this patch and let me know if you have any problems or suggestions!
Thanks,
iceiceice
-
- Posts: 373
- Joined: October 13th, 2008, 4:35 pm
Re: RBY Unofficial Patch
Hi, thanks for reporting this, I remember the issue with the map getting repeated(though I never knew what Q did to fix it!), I never noticed this leader problem before.
I haven't had time to check this yet, but assuming it works I can put it into the official RBY.
We should give Q some time to respond though, but I'm not sure if he checks the forum much anymore.
I haven't had time to check this yet, but assuming it works I can put it into the official RBY.
We should give Q some time to respond though, but I'm not sure if he checks the forum much anymore.
Re: RBY Unofficial Patch
Yes, I agree this would be best -- I simply wanted to make something temporary for the meantime. I find RBY addon is the single addon that I use the most, and I think the RBY Era was a really good idea; once I realized that I could do something about the problem I figured I should just do it rather than wait for someone else to address my complaint. Most likely the little code that I had to write is inefficient somehow since I do not know my way around WML, so perhaps Q may discard my version, but if someone finds it useful in the meantime then that's great. It seems like RBY is used by a lot of people.The Black Sword wrote: We should give Q some time to respond though, but I'm not sure if he checks the forum much anymore.
Also:
When testing the patch with various RBY map pools, I noticed that sometimes I will intermittently get a prestart error and crash:
1) I have been able to generate this consistently by making an RBY_Custom map pool which contains only the map Clearing Gushes, in any era , including default era.Error
Error while playing the game : game_error: creating unit with an empty type field
2) Same for the map Scarred Foothills.
3) I do not get the error when I start either map directly, without the RBY map pool. So I think it is likely a problem with the cfg files used for each of these maps by RBY add-on ; I am not familiar with these maps and I don't think I am prepared to patch whatever is going wrong there.
4) I have not seen any such errors using Unofficial RBY Era (or any era for that matter) on any RBY map pool excluding these two maps. If you got such an error please let me know.
Re: RBY Unofficial Patch
great work, keep working on it
once it's all ironed out I'll announce it on the ladder main page too
once it's all ironed out I'll announce it on the ladder main page too
"There's no love in fear." - Maynard James Keenan
I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D
Wesnoth Strategy Guide for competitive 1v1 viewtopic.php?f=3&t=54236
I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D
Wesnoth Strategy Guide for competitive 1v1 viewtopic.php?f=3&t=54236
Evaluation of statistics of RBY unofficial patch v3.1
tl;dr
I wrote down the results of 50 games from the RBY patch era currently on the add-on server. I didn't get any errors and didn't see any patterns that looked out of the ordinary to me. I think this means the patch is pretty good.
Long version
On the train yesterday I started 50 local 1 v 1 games using RBY No Mirror Unofficial v 3.1 (on the add-on server) and using RBY_Custom map pool which contained all maps except Clearing Gushes and Scarred Foothills.
First of all, I did not get any prestart errors, so I am quite confident now that those are the only maps which have problems in RBY, and I'm reasonably confident that RBY No Mirror Unofficial is mostly if not totally free of such errors.
Now, about the statistics observed: Here's how many times each faction and faction matchup occurred.
~ iceiceice out ~
I wrote down the results of 50 games from the RBY patch era currently on the add-on server. I didn't get any errors and didn't see any patterns that looked out of the ordinary to me. I think this means the patch is pretty good.
Long version
On the train yesterday I started 50 local 1 v 1 games using RBY No Mirror Unofficial v 3.1 (on the add-on server) and using RBY_Custom map pool which contained all maps except Clearing Gushes and Scarred Foothills.
First of all, I did not get any prestart errors, so I am quite confident now that those are the only maps which have problems in RBY, and I'm reasonably confident that RBY No Mirror Unofficial is mostly if not totally free of such errors.
Now, about the statistics observed: Here's how many times each faction and faction matchup occurred.
. D K L N R U
D . 2 2 6 6 3
K . . 0 6 5 5
L . . . 1 4 4
N . . . . 2 3
R . . . . . 1
U . . . . . .
D: 19
K: 18
L: 11
N: 18
R: 20
U: 16
Q: Should we be concerned that loyalist appeared fewer times than the other factions?
Q: Should we be concerned that some faction matchups occurred as many as 6 times and others like Loy vs. Knalgan didn't appear at all?
Q: As far as what leader matchups occurred: No leader matchup was exactly repeated, but some leader matchups sort of repeated -- for instance we had (p1) Stalwart vs (p2) Deathblade and (p1) Deathblade vs (p2) Stalwart, and the same for Stalwart vs Crossbowman. Should we be concerned?
Q: The problem we were supposed to be fixing was that in the official RBY era, knowledge of your own leader often determines the enemy leader and faction, and thus could significantly affect your strategy. Do we know that this is not the case now?
[u]Bottom Line[/u]
Raw Results
Re: RBY Unofficial Patch
looks good to me
what do you think about adding it into RBY, TBS?
what do you think about adding it into RBY, TBS?
"There's no love in fear." - Maynard James Keenan
I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D
Wesnoth Strategy Guide for competitive 1v1 viewtopic.php?f=3&t=54236
I'm the guy who's responsible for 40% Gliders in all hexes... I can now die a happy man. =D
Wesnoth Strategy Guide for competitive 1v1 viewtopic.php?f=3&t=54236
-
- Posts: 373
- Joined: October 13th, 2008, 4:35 pm
Re: RBY Unofficial Patch
Ok, seems to check out to me, so I released a new version with the patch.
I'll have a look at those maps.
I'll have a look at those maps.
Re: RBY Unofficial Patch
Ok, I don't know what will happen now if I delete the patch from the add-on server, will that automatically delete it for all the users? I decided to update the patch so that now it puts a note saying that it is Obsolete and to use v 1.10.21 of the RBY add-on instead.
- Quetzalcoatl
- Posts: 207
- Joined: March 18th, 2009, 3:26 pm
Re: RBY Unofficial Patch
Hello, great work!
Unit with empty type error - likely its related to shuffle sides option. I never saw this error when I was playing with shuffling disabled. As for the questions I would not worry much, to me everything seems to be fine.
RBY has git repo so if you would like to have direct access to it let me know (https://github.com/WesnothRBY - last commit was tagged 1.10.20).
Cheers
Q
Unit with empty type error - likely its related to shuffle sides option. I never saw this error when I was playing with shuffling disabled. As for the questions I would not worry much, to me everything seems to be fine.
This issue may again be related to shuffle sides. There is patch submited (unfortunatelly uncommited) at: http://gna.org/bugs/?19055. To put is as simple as possible: if shuffle is enabled both players get leader with same id (where id is index in array of leaders). So now if p1 has leder no 7 and p2 gets leader no 7 as well. Now if p2 has only 5 possible leaders engine crashes with empty type error.Q: As far as what leader matchups occurred: No leader matchup was exactly repeated, but some leader matchups sort of repeated -- for instance we had (p1) Stalwart vs (p2) Deathblade and (p1) Deathblade vs (p2) Stalwart, and the same for Stalwart vs Crossbowman. Should we be concerned?
RBY has git repo so if you would like to have direct access to it let me know (https://github.com/WesnothRBY - last commit was tagged 1.10.20).
Cheers
Q
Ten soldiers wisely led will beat a hundred without a head.