NATION

PASSWORD

Issue repetition change - attn [violet]

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Issue repetition change - attn [violet]

Postby New South Hell » Wed Jun 17, 2009 4:35 am

Perhaps this should be posted in the Issues Forum and not here. But I'm putting it here with the hopes of getting [violet]'s attention.

The recent change to make issue repetition less annoying seems to have had a major side-effect which I found surprising, and which I suspect was not intended. I have one instance with a very young nation, so I don't think it's just a phenomenon of transition from the old data structure to the new data structure.

This morning, my nation of Communist Ijeobot answered its 21st issue, and got a repeat, not of issue 0. Never before have I seen a nation repeat before its 108th issue (with the exception of issue 0). Another nation had its first repeat issue at number 100, which got me suspicious, but was not completly out of line with the past.

Also, 11 other nations also answered their 21st issue this morning. Up till now, as recounted in my Issue Repetition essay, the 21st issue was the first one not taken from the set 0-30. Occasionally, you would get one or two more from 1-30, but not often, and when it happened, I interpreted it as being random selections from the full set of issues rather than an uncertainty in the cutoff point. All 12 of these nations on their 21st issue picked another issue from the starter set of 0-30, even though only one was a repeat. I wonder whether they will ever generate an issue not from the set, or whether they are permanently stuck in 0-30 mode.

At any rate, since I may be the only one in NationState getting issues for over a hundred nations and paying attention to them, I figured I should report the behavior change. It may be benign, or even intended, but it's quite a surprise.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Wed Jun 17, 2009 4:45 pm

I just finished processing the afternoon issues for the 12 nations, the ones that seemed to be stuck in the starter set of issues 0-30. It doesn't seem to be permanent - 6 of the 12 had their 22nd issue from the full set, and 6 picked another starter issue. I've only had a nation get two starter issues for their 21st and 22nd about 2 or 3 times in all the nations I've played, and now suddenly it happens to 6 at once.

This doesn't seem to be so dire as I was thinking when I posted this morning, but I am still betting it wasn't intended, and it still doesn't seem like this change to the behavior of young nations is a change for the better.

TIA for checking it out.

User avatar
[violet]
Site Admin
 
Posts: 15707
Founded: Antiquity

Re: Issue repetition change - attn [violet]

Postby [violet] » Wed Jun 17, 2009 10:26 pm

Thanks for keeping an eye on things!

The old criteria for moving between the "starter set" and the larger pool was having received 18+ issues or a population of 50M+, not counting the first one; it's now 20+/50M+, but the initial issue (the infamous #0) is counted, although only in nations who received it since the change.

Issue repetition in general: prior to my change, it was always possible to get a repeat at any time, but very unlikely. (Extraordinarily unlikely.) It's not more likely, but still should be very unusual, particularly for nations that are valid for most issues. I'd like to hear how often they come up in your ideobots.

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Thu Jun 18, 2009 3:56 am

[violet] wrote:Thanks for keeping an eye on things!

The old criteria for moving between the "starter set" and the larger pool was having received 18+ issues or a population of 50M+, not counting the first one; it's now 20+/50M+, but the initial issue (the infamous #0) is counted, although only in nations who received it since the change.

Issue repetition in general: prior to my change, it was always possible to get a repeat at any time, but very unlikely. (Extraordinarily unlikely.) It's not more likely, but still should be very unusual, particularly for nations that are valid for most issues. I'd like to hear how often they come up in your ideobots.


I'll keep you posted. The fact that these 12 slipped under the wire (with issue 0 not counted) explains why they all went one issue further. For 6 of them to go yet another still seems a sign of something peculiar, or at least different, going on, though it could of course just be a low-probability event occurring at just the right time to confuse us all. And getting a repetition at issue 20 still seems shocking to me - is it possible that that one had no unseen starter set issues for which it was eligible? (I've observed that highly undemocratic and repressive nations seem to have a significantly smaller pool of issues they qualify for, and Communist Ijeobot is certainly one of those.)

One other interesting note is that all 12 nations had issue 0 repeat within their first 21. That too is unusual. I don't have an exact figure, but prior to the change, less than 50 % of my nations (I think significantly less) saw issue 0 a second time during their childhood. Some of them got 0 the second time before your change was made, and I haven't gone back and checked them out with that distinction in mind - so I guess this might not be an effect of the change at all.

As it happens, I have 20 more nations that will hit their 20th issue in the middle of next week. (Great decline? Not if I can help it! :lol:) They were all created the day before your changes, so they should go 21 issues in the starter set. I'll definitely let you know of any anomalies.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Thu Jun 18, 2009 4:33 am

The remaining 6 of the 12 moved out of the starter set this morning.

User avatar
[violet]
Site Admin
 
Posts: 15707
Founded: Antiquity

Re: Issue repetition change - attn [violet]

Postby [violet] » Thu Jun 18, 2009 5:22 pm

New South Hell wrote:And getting a repetition at issue 20 still seems shocking to me - is it possible that that one had no unseen starter set issues for which it was eligible? (I've observed that highly undemocratic and repressive nations seem to have a significantly smaller pool of issues they qualify for, and Communist Ijeobot is certainly one of those.)

I doubt it had no valid remaining issues, although it probably had fewer of them than most nations, which increased its chances of getting a repeat. Prior to my change, the game would try 40 times to find a valid, non-repeating issue for nations before accepting a repeat; it now only tries 10 times. Let's see how this goes in your other nations; if we see another repeat or two in the starter set, I'll crank it back up some.

User avatar
[violet]
Site Admin
 
Posts: 15707
Founded: Antiquity

Re: Issue repetition change - attn [violet]

Postby [violet] » Thu Jun 18, 2009 5:39 pm

Actually, upon investigation, some nations could indeed run to a very small pool of valid "starter set" issues quite quickly. I've made a couple of changes. The game will now try harder to find a non-repeating issue, and will accept an issue from beyond the starter set for a new nation if it's having trouble finding a valid one.

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Thu Jun 18, 2009 8:24 pm

[violet] wrote:
New South Hell wrote:And getting a repetition at issue 20 still seems shocking to me - is it possible that that one had no unseen starter set issues for which it was eligible? (I've observed that highly undemocratic and repressive nations seem to have a significantly smaller pool of issues they qualify for, and Communist Ijeobot is certainly one of those.)

I doubt it had no valid remaining issues, although it probably had fewer of them than most nations, which increased its chances of getting a repeat. Prior to my change, the game would try 40 times to find a valid, non-repeating issue for nations before accepting a repeat; it now only tries 10 times. Let's see how this goes in your other nations; if we see another repeat or two in the starter set, I'll crank it back up some.


One thing I'd observed is that when something happened that made one eligible for an issue for which one had never previously been eligible (like repealing a ban, or an Easter egg, or certain issues only valid for older nations), you would often get that issue immediately, but sometimes it would take 2 or three issues, and occasionally it would be significantly longer. And often you would get a repeat issue rather than the new one. That strongly implies that those 40 tries were no guarantee that one of a few new issues would be picked - my estimate of the probability would be around 25 %. I'd therefore expect the reduction to 10 tries to have a very significant effect of causing more repeats overall, and also of delaying the appearance of newly eligible issues, which might sometimes be good (repeals) and sometimes be bad (age-related issues). I'm curious to know if you went all the way back to 40 tries, or even beyond, but you may well have good reasons not to tell me. ;)

It occurs to me that it might be useful, if you don't already have such a thing, for you to have some kind of tool to drive the issue selection code, so that the gross effects of changes like these could be measured in advance of putting them in. In some sense, the way I play NationStates is such a tool - the problem being that it doesn't get you answers very fast, and certainly not before you install the changes. Of course, I don't think changes like these are attempted very often, which would make the usefulness of any such tool infrequent. Still, the idea seems worth a mention.

- nsh -

User avatar
[violet]
Site Admin
 
Posts: 15707
Founded: Antiquity

Re: Issue repetition change - attn [violet]

Postby [violet] » Thu Jun 18, 2009 8:59 pm

I do have a little script to simulate issue generation, but a difficulty is that different nations are eligible for different issues. So while I can easily simulate how it shakes out for a particular nation, it's not so simple to simulate how it works for all nations. (New South Hell, for example, seems eligible only for 96 issues, which is not many at all.) So this is where your ideobots are useful, as representatives of common issue-choices.

I agree that nations are now probably significantly less likely to receive a new issue immediately upon becoming eligible for it, which is not ideal, but, in my opinion, acceptable given the benefit of not having the server thrash around like an idiot trying to find valid issues during daily updates. (It's 15 tries now.)

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Fri Jun 19, 2009 3:42 am

[violet] wrote:I do have a little script to simulate issue generation, but a difficulty is that different nations are eligible for different issues. So while I can easily simulate how it shakes out for a particular nation, it's not so simple to simulate how it works for all nations. (New South Hell, for example, seems eligible only for 96 issues, which is not many at all.) So this is where your ideobots are useful, as representatives of common issue-choices.

I agree that nations are now probably significantly less likely to receive a new issue immediately upon becoming eligible for it, which is not ideal, but, in my opinion, acceptable given the benefit of not having the server thrash around like an idiot trying to find valid issues during daily updates. (It's 15 tries now.)


So what you're saying is that I should be nicer to my citizens occasionally, to open up the possibility of being able to be nasty to them later, in exotic new ways. I dunno, we're great believers in tradition in New South Hell. :twisted:

Dunno what it's like in Perl, but in the languages I use (including Python, which is Perlish on the inside and the anti-Perl on the outside), random number generation is pretty cheap. Still, if I were out to choose an item from a set of items with different weights, I'd just use a technique where I get a single random number, and then subtract off the weights of each item in turn, until the number goes below 0. Very effective, and you only need one random number. I've done this quite a lot in my own projects, and one advantage of it is that you know exactly what you're getting, whereas with your iterative techinique, you either need to do some possibly serious and annoying mathematics to get the actual odds, or you need to run a lot of experiments. Just a thought.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Fri Jun 19, 2009 4:15 am

And sure enough, one of that set of 20 nations working their way through childhood, a repressive outfit called The Black Swamps, just got issue 119 as their 13th issue! My previous experience leads me to believe that there were in fact still starter set issues for which it was eligible, so 15 tries is probably still too small.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Fri Jun 19, 2009 4:29 am

[violet] wrote:I do have a little script to simulate issue generation, but a difficulty is that different nations are eligible for different issues. So while I can easily simulate how it shakes out for a particular nation, it's not so simple to simulate how it works for all nations. (New South Hell, for example, seems eligible only for 96 issues, which is not many at all.) So this is where your ideobots are useful, as representatives of common issue-choices.

I agree that nations are now probably significantly less likely to receive a new issue immediately upon becoming eligible for it, which is not ideal, but, in my opinion, acceptable given the benefit of not having the server thrash around like an idiot trying to find valid issues during daily updates. (It's 15 tries now.)


I get the feeling, though I'm not sure, from your first paragraph above that what you mean is that you can run an existing nation through the process, and come up with its "next" choice (subject to the whims of the RNG, of course). But what I was thinking was the ability to run some nations from birth to maturity and beyond, to get an idea of whether the gross statistics had changed and, if so, whether in a good way. For instance, in the case of yesterday's changes (yesterday's in my time zone), how often a non-starter issue will be chosen for a starter nation.

I'd be happy to share with you the code and other foundations for my ideological researches - which are an actual attempt to codify real-world political outlooks in terms of issue-choices. I think you could use this to run nations of various sorts, libertarian, repressive, capitalist, socialist, left-wing, right-wing, sensible, psychotic, and so on through the whole life-cycle, and see how it works out. It could help you find the right number to take the place of 10, 15 or 40 a little sooner...

If you're interested in following up on this, let me know via a non-public channel. I'm sure you have several options for doing this without further directions from me. ;)

- nsh -

User avatar
Mayor For Life
Spokesperson
 
Posts: 126
Founded: Oct 06, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby Mayor For Life » Fri Jun 19, 2009 9:49 am

New South Hell wrote:...snip...

I'd be happy to share with you the code and other foundations for my ideological researches - which are an actual attempt to codify real-world political outlooks in terms of issue-choices. I think you could use this to run nations of various sorts, libertarian, repressive, capitalist, socialist, left-wing, right-wing, sensible, psychotic, and so on through the whole life-cycle, and see how it works out. It could help you find the right number to take the place of 10, 15 or 40 a little sooner...

- nsh -


The Ideobot nations themselves are around 400 million citizens as of this post and the thread where nations used NSH's "real-world political outlooks in terms of issue-choices" to program them is viewable here:
http://cityofulthar.wordpress.com/2009/03/28/build-your-own-ideobot/

A quick way to track any particular bot of interest is to use the links here:
http://cityofulthar.wordpress.com/ns-school/ideobot-community-center/
... because the bot nation name in each of those threads is a link to the nation on NS.

Painstakingly recorded for posterity is every decision made by every bot and the result here:
http://cityofulthar.wordpress.com/2009/04/07/bot-news/

I think it will be interesting to compare the new crop-o-bots NSH recently created with the more mature Ideobots in terms of issue repetition. But I'm prejudiced. I love this experiment. And I appreciate the effort to recode NS so that issue repetition is less of a concern for older nations who still love to play the game.


Mayor for Life
Founder of Ulthar

User avatar
[violet]
Site Admin
 
Posts: 15707
Founded: Antiquity

Re: Issue repetition change - attn [violet]

Postby [violet] » Fri Jun 19, 2009 8:11 pm

I have read those links previously! I love the ideobot experiment too.
New South Hell wrote:Dunno what it's like in Perl, but in the languages I use (including Python, which is Perlish on the inside and the anti-Perl on the outside), random number generation is pretty cheap.

It's not the number generation; it's the validity checking. When the game pulls out a random issue, it needs to do some calculations to see if it's valid for the nation in question: these aren't particularly horrible, but if we're doing 40 of them for every nation in the game, that's 2 million algorithms, all of which need to be done at roughly the same time. So cutting that in half is good.

Still, if I were out to choose an item from a set of items with different weights, I'd just use a technique where I get a single random number, and then subtract off the weights of each item in turn

The problem here is if you're talking about 50,000 nations and 250 issues, that's 12.5 billion calculations just to establish the weights!

New South Hell wrote:But what I was thinking was the ability to run some nations from birth to maturity and beyond, to get an idea of whether the gross statistics had changed and, if so, whether in a good way. For instance, in the case of yesterday's changes (yesterday's in my time zone), how often a non-starter issue will be chosen for a starter nation.

I am interested in hearing that: as I think you're implying, my testing doesn't actually include answering any issues, meaning that my test cases are eligible for exactly as many issues at the end of their lives as in the beginning. And obviously this is not the case in reality.

Part of my changes will definitely lead to more issue repetition in younger nations, as previously that was (almost) unheard of, while now it's merely unlikely. My thinking here is that speeding up the daily update is worth it.

User avatar
Sirocco
Retired Moderator
 
Posts: 500
Founded: Antiquity
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby Sirocco » Fri Jun 19, 2009 9:51 pm

Sounds like I need to put through more 'valid for everyone' issues.

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sat Jun 20, 2009 4:10 am

[violet] wrote:
New South Hell wrote:Still, if I were out to choose an item from a set of items with different weights, I'd just use a technique where I get a single random number, and then subtract off the weights of each item in turn

The problem here is if you're talking about 50,000 nations and 250 issues, that's 12.5 billion calculations just to establish the weights!


Edit: Parts of the analysis below are annoyingly wrong, because I was overlooking something that will be obvious to you as you read it, but was not to me until the big light went on. So, before responding instantly to tell me I'm full of crap, read on to the end of the thread, as there will be a corrective post in which I explain that myself. Sorry!

The weights don't have to be complicated. Suppose you had weights of 100 for non-repeat issues, and 1 for repeats. That's not expensive to compute! 100 is a number I pulled from my posterior - it may be loony. But it could be that simple. You said New South Hell was eligible for 96 issues. That's probably fairly close to a lower bound - and I have good reason to believe that the upper bound is in the 170's. (As always, could be wrong.) When I get some free time, I can run some models, and try to do the math to come up with a good weight between repeats and non-repeats that leads to distributions not grossly dissimilar to what we had before this all started. (I started to write "what we have now", but I don't know what we have now!) For that matter, I can play with 10 and 15 and 40, and see if a better number of repetitions can be worked out.

Unfortunately, today I have much less time than usual to geek away in delight in NationStates-related activity. But the point is that with a little mathematics and analysis (and knowledge of the basic game parameters) one can do better than puliing numbers out of posteriors, even though some of us do have have very sophisticated posteriors that often generate useful numbers.

The fact that there are 50,000 nations and finite time to compute in means that performance counts of course, but if computing weights (whether in a simple way or a complicated way) and getting a single random number is cheaper than getting 15 random numbers (or some larger n if there turns out to be a good reason for one), then it's better to go with the calculations, even if the calculations are expensive themselves. If a < b, a*n < b*n (for n positive).

(Incidentally, your 15 random numbers could be replaced by a single random number, with the weights based on an approximation to the odds produced by the repeated procedure. Getting those odds 100 % accurate would involve some exponentiations, which are going to be expensive, but there are decent fast approximations for that sort of thing. At least once, in another life, I used this tehcnique to replace thousands of random numbers with a single one. And it was good.)

(One other parenthesis - there are really three cases here: one, there are so many issues for which the nation is elgible that you almost always get one in 2 or 3 tries; two: there are so few eligible issues, you will have to go the distance, and most likely fail to get a non-repeat; three, you are somewhere in the gray area, which becomes smaller and smaller as the number of repeats increases, where the outcome is seriously in doubt. Simply knowing that "if there are fewer than n non-repeat issues left, I should give those issues a weight of (posterior action again) ten, everything else 1, and roll the dice once", would let you save a lot of repetitions. In the middle area you'd have to do something more complex, possibly what you're doing now, but it would be manageable for both the young and the old nations. With n = 40, middle age was (I think) generally from 120-170 issues, but I think that the NationStates community is heavily tilted towards young nations. (See Unibot's generational researches.) (Of course, his findings do not necessarily apply to the subset which is the NationStates issue-answering community. Maybe someone with access to the database could scan for an age distribution of the nations that still bother with issues. Would be interesting.) The exact years of middle age would depend on the number of eligible issues, but surely you have the cycles to count them in these computations, n'est-ce pas? :) )

[violet] wrote:Part of my changes will definitely lead to more issue repetition in younger nations, as previously that was (almost) unheard of, while now it's merely unlikely. My thinking here is that speeding up the daily update is worth it.


Sure - there are always balances that need to be considered. From my perspective though, I would find it quite ironic if my suggestions for making issue repetition less annoying made you happy because it allowed you to speed up the update, at the cost of making issue repetition more annoying, which would make me not exactly unhappy, but at least shaking my head at the perversity of the world.

Let me run some numbers, when I can, and get back to you.

- nsh -
Last edited by New South Hell on Sat Jun 20, 2009 9:25 am, edited 1 time in total.

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sat Jun 20, 2009 4:27 am

Sirocco wrote:Sounds like I need to put through more 'valid for everyone' issues.


Could be. And, even more, you need more issues for dictators and repressors.

I believe there are a number of issues which are (abstractly) too difficult to get. And some that are too easy as well, of course. But making it all consistent and accessible is, I understand, a difficult and mostly thankless job.

Someone with access to the actual data could produce a snapshot of exactly how many nations are eligible for each issue - which could point out anomalies, issues that almost no one gets to answer. A chart of number of eligible issues versus government type could tell you a lot about where more issues would help. There are probably some other factors that NS tracks internally that could correlate interestingly with number of eligible issues. Imagine discovering that we need more issues for the corrupt!

The database is a treasure-trove of information about the nations of NationStates. (Well, DUH! :palm: ) Learning the statistical patterns of usage from it strikes me as a very good thing to do for guidance in taking the game to the next level (aleph-0 to aleph-1 :lol: ) in fun.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sat Jun 20, 2009 6:09 am

Assuming that the mechanism by which you determined that New South Hell had only 96 issues for which it was elgible was not too tedious or time-consuming, I'd like to ask a favor. (Just a little favor. Think of everything I've done for you! : obsequious : )

I'd like to know the number of issues that the nations in the following regions are eligible for:

Ideology Testing Inc
The Extremities
The Ideobot Playground 21

I think that both Sirocco and myself would find these numbers to be most enlightening.

I'd also like to have such readings for these nations:

Eternal Repentance
Revolving Door

Sirocco won't care a bit about them, but I'm extremely curious to know for myself.

Thanks in advance, O mighty one!

- nsh -

User avatar
Mayor For Life
Spokesperson
 
Posts: 126
Founded: Oct 06, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby Mayor For Life » Sat Jun 20, 2009 7:18 am

New South Hell wrote:...
Unfortunately, today I have much less time than usual to geek away in delight in NationStates-related activity. But the point is that with a little mathematics and analysis (and knowledge of the basic game parameters) one can do better than puliing numbers out of posteriors, even though some of us do have have very sophisticated posteriors that often generate useful numbers...
- nsh -


TMI dude, TMI.
:eek:
*shudders*


Mayor for Life
Founder of Ulthar

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sat Jun 20, 2009 9:35 am

OK, what I was overlooking in my post above is that the cost of computing a weight of zero, an inapplicable issue, is not necessarily small, and you almost certainly don't want to do it for every issue for every nation. Better to get an issue at random, and then see if its applicable. Further, probably a majority of the inapplicable issues will also be issues which have never been answered, and so will seem to be highly desirable non-repeat issues. Which means if you give non-repeat issues a higher weight, you increase the likelihood of getting one you can't use. Nasty.

A small optimization would be at least to drop an issue from the list once you discover it's inapplicable - but you may aleready be doing that and, anyway, it's not all that big an optimization.

I'm still going to run some numbers based on this insight - if I can make the numbers for 40 iterations line up with the old behavior, I'll know I have a kind of useful model, and then can worry about whether there is a significantly smaller n than 40 that doesn't distort things too bad.

Having a special label for any universally applicable issues would be a good thing, maybe. It would mean they could easily be given extra weight. Of course that would also mean you'd use them up faster, and be back in the same situation as before.

I tell ya, it's always good to get a refresher course in humility - and nothing does that better than extrapolating too far, too fast from a situation of imperfect knowledge. Sorry 'bout that.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sat Jun 20, 2009 11:11 am

I hope nobody minds me making post after post on this thread with random thoughts. ("I need a dump truck, Mama, to unload my head.") But probably no one is following it but [violet], sirocco and really hard-core issue geeks, so I'm probably not annoying a lot of people, just important ones. :unsure:

Here's an idea for being able to use fewer random numbers to find an applicable issue. It would take more storage for each nation, and that may eliminate it from consideration right there. But it might inspire something better in that case, in the same way that [violet] took the suggestions in my paper and was inspired to do something much simpler.

We have a list of issues that a nation has been asked, now ordered by when it was most recently asked. How about a second list, of issues that have been found to be inapplicable, ordered by how recently they were found to be inapplicable? Then, after a nation has reached an age where it is either repeating, or on the verge of repeating, we use the following algorithm. We've divided issue space into three parts, the potential repeats, the ones we've never ever considered (almost certainly the null set by this time), and the ones we've rejected at least once, and never chosen. For New South Hell, there are 122 issues in the repeatable set, (almost certainly) none in the never-looked-at set, and 113 (or so) in the rejected set. For the next issue, we take all the repeats, any never-looked-ats, and the first n (let's say n is 10, or maybe 10 %) of the rejected ones (which might now be applicable, because of some choice I made since the last rejection). Give the repeats weight 1 (with some fudging to prefer issues not seen recently), the never-seen and the rejecteds weight 10 (or more), and select from that set. An inapplicable repeat stays where it is (or moves to the end of the repeat list to lower the chances we'll end up looking at it again soon). An inapplicable never-seen or reject goes to the end of the reject list. You have many fewer probable rejects to go through before you find something you can use.

An obvious problem with this is that it can take a while for a newly applicable issue to rise in the list to where you can consider it. (A larger n makes that happen sooner, at the cost of increasing the number of random numbers you have to get to get something you can use.) I'm not sure this is a bad thing. The fact that after banning alcohol you may well get the option to repeal next turn seems like a blemish, even though I like the fact that I get certain issues very soon after my population rises to their level of applicability. I think, overall, the possibility of more delay in getting a newly applicable issue is not a bad thing.

It might require careful selection of the numbers for this to work well, but I think it has possibilities. Anyway, it's just an idea, offered without warranty of any kind.

- nsh -

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sat Jun 20, 2009 5:32 pm

This is my last post of the evening, I swear.

I have now run some numbers. I was hoping I could convince myself I had accurately modeled the old regime, and failed at that. But I did find one or two interesting thing about a very simplified model, and what it produced when the number of random choices is varied.

To start with, here are the characteristics I determined by long experience for the old ways. The first 20 issues are from the starter set, and don't repeat except for possibly issue 0. After issue 20, all issues become eligible, and eventually issues (other than 0) start repeating. The earliest I ever saw it was issue 108; the latest, issue 157. 131 was the average.

[violet] noted early in the thread that what the code was doing was randobmly choosing an issue up to 40 times, and throwing it away if it was a repeat (or, I presume, if it was inapplicable). What happens after the 40 isn't entirely clear, but the obvious approach is to continue picking random issues, but now accept a repeat, which means both that you might need a few more random numbers than 41, and that you could pick up a non-repeat issue after you'd given up, by luck.

So my oversimplified model was a nation which had 150 eligible issues, out of 230, such that the eligible set never changed. I assumed that I would pick a random issue up to n times and then, for simplicity, I assumed at that point that a repeat would always be chosen. This would mean that 150 would be the absolute upper bound of how long you could go without a repeat.

There were two interesting numbers to compute here. First, how many issues would you have to answer to make the probability of a repeat by that point 50 %. Second, how many would you have to answer to get a 1 % probability of a repeat. This is interesting because I've played enough nations that I've probably gotten one or two nations with such an improbably early first repeat.

If n is 40, the 50 % point is 138 issues, that is, half the time, I would see an issue repeat by issue 139. With 40 iterations, the 1 % point would be 108 - that is, by the time I got to issue 109, there would be a 1 % chance of having seen a repeat.

With n 15, the 50 % point is issue 108, and the 1 % point is 65. You see repeats a lot earlier. You have a 50 % chance of getting a repeat while you still have over 40 eligible issues!

I had a brainstorm. Suppose you made the number of iterations depend on the number of issues answered. You allow for a lot of them in early life, when there are going to be lots of non-repeat issues to find, and gradually cut down the number as there are getting to be fewer fresh issues still available.

My first model said start the number of repeats at 40, and let it smoothly decay to 15 at age 150. With this strategy, the 50 % point is issue 136, and the 1 % point is at issue 107. Not especially worse than n = 40, but by the time you've reached age 100, you're only allowing 24 random numbers before giving up.

My second model said: we know that even the most despicable nation can find 100 issues it can answer. (I don't have complete records for New South Hell, but since I started keeping them, it's answered 122 distinct issues, considerably more than the 96 it's currently eligible for.) So suppose we keep n = 40 until age 100, and then let it decay more rapidly to 15 at issue 150. The 50 % point for this is 138, and the 1 % point is 117. Which is interesting. It's better, but not all that much better. Which means that starting the decay early is pretty reasonable. I didn't try starting the decay at 20 rather than 0, but it's probably little different, and I think it's a good idea because it helps keep the starter issues behaving they way they always have.

Would this approach of letting n fall for older nations actually be beneficial? That all depends on what the distribution of ages is for nations that haven't turned off their issues. If most of them are young, you haven't saved much in the total update time by dropping n for old nations - but if older nations are common, then it could still really help. (Note that older is, in my simple case, 150 issues answered, which takes slightly less than 3 months to achieve.) This makes the project of finding out the age distribution for nations that care about issues even more interesting.

I suppose I should note that keeping n at 40 early in a nation's career helps keep the early behavior of nations like it's always been. I think that behavior is kind of proven by history, and I really don't like the idea of repetitions starting at issue 65. Having a decaying n might be a useful compromise between slashing it to make the update run faster and doing nothing at all.

If you guys have suggestions for improving the accuracy of the model here, I'm all ears. I've simplified away an awful lot of complicated and relevant details.

- nsh -

User avatar
Monkeys in Helmets
Lobbyist
 
Posts: 22
Founded: Aug 30, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby Monkeys in Helmets » Mon Jun 22, 2009 3:13 pm

New South Hell wrote:I hope nobody minds me making post after post on this thread with random thoughts. ("I need a dump truck, Mama, to unload my head.") But probably no one is following it but [violet], sirocco and really hard-core issue geeks, so I'm probably not annoying a lot of people, just important ones. :unsure:

:clap:

There are a surprising number of hard core issue geeks according to the stats associated with your Ulthar Forum posts on issues. I think any effort (because this guy's math is beyond me) to make playing issues more interesting for the first year is worth exploring.

I think Sirocco's post on increasing the number of universally applicable issues is important. As interesting as "tree" issues might be, they can have the undesirable effect of decreasing the number of available issues.

Admitting what I don't know is much greater than what I do, the distribution of nation categories here:
http://cityofulthar.wordpress.com/2009/03/28/government-type-statistics/

... has caused me to wonder if the last 7 categories aren't merely unpopular, but more difficult to achieve because fewer issue outcomes get you there. It's might be both. If there's a relationship between the number of opportunities to choose "Conservative Democracy" or "Tyranny by Majority" as a direction and paucity of nations in those categories, it would be interesting if those who know what's under the hood in terms of distribution would post an occasional "want ad" for issues that include an outcome that is currently less common.
Last edited by Monkeys in Helmets on Mon Jun 22, 2009 3:15 pm, edited 1 time in total.
The Blithering Nonsense of Monkeys in Helmets
Unofficial Curmudgeon of Ulthar

User avatar
Zwangzug
Issues Editor
 
Posts: 4935
Founded: Oct 19, 2006
Left-wing Utopia

Re: Issue repetition change - attn [violet]

Postby Zwangzug » Mon Jun 22, 2009 4:10 pm

Tyranny by Majority and Conservative Democracy are weird/rare because they have low personal but high political freedoms; in general, these two markers seem to be correlated. There aren't a lot of issues where one option promotes one and hurts the other (see here)...I had an idea for the issues contest, but the overall theme had already been used. Oh well, I'll keep looking.
Factbook
IRC humor, (self-referential)
My issues
...using the lens of athletics to illustrate national culture, provide humor, interweave international affairs, and even incorporate mathematical theory...
WARNING: by construing meaning from this sequence of symbols, you have given implicit consent to the theory that words have noncircular semantic value and can be used to encode information about an external universe. Proceed with caution.

User avatar
New South Hell
Spokesperson
 
Posts: 161
Founded: Feb 15, 2008
Ex-Nation

Re: Issue repetition change - attn [violet]

Postby New South Hell » Sun Jun 28, 2009 4:28 am

I just thought it might be worthwhile to post something about how the new code is working out after a couple of weeks.

I'd say it's doing good. I have noticed that

1. You now get repetitions considerably earlier than you used to. But their occurrence is very gradual. You may get your first repeat at the 80th issue, and then not see another one until 90. None of the nations I have that have begun repeating in the last 3 weeks or so have entirely run out of unseen issues yet.

2. It does appear that repeating an issue you've seen recently happens much less often. I think in another couple of weeks, the effects of the transition period should be over, even for my older nations, and I'll be able to evaluate this better.

3. The phenomenon of getting a non-starter issues in the first 20 for a new nation is not all that uncommon. I've seen it in 4 out of 20 nations created immediately before the new code went in. No nation has gotten two of them (which means that, I believe, if the number of tries for an acceptable issue were doubled to 30, I would likely not have had any). I created another batch of nations yesterday - I'll be interested to see how they behave. This is the first batch I've created since the changes began.

4. I've seen no more repeats during the start-up period.

So, all in all, it looks like it's doing what it's supposed to. I'm a little sad about the occasional breaking of the previously unbreakable startup issue set behavior but, hey things change, and overall this is pretty clearly for the better.

Give me enough time (and enough nations) and I should have some more quantitative results about it all.

- nsh -

Next

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads