Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - BinaryBeast1010011010

Pages: 1 ... 8 9 [10] 11 12 ... 19
136
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 10:53:42 am »
wars having an impact on populations... Did not think about it but that makes sense. About population centers, I gather from what I read around the threads since I lurk around here that it is mainly depending on the biome (as in forest, moutains...) Pop will "spawn" there, if you have a big forest, then in the center shall spawn the first elven retreat, same in mountains (though I think mineral ressources should introduce a modifier for everyone but elves)... But I would like to focus on elven and goblin civs, since both are immortals and goblins dont need to it, the questions that pop up are :
1st, about elves : how do the freaky tree huggers regulate their pop during world gen, since no one dies from old age and they are not as war like as goblins... I genned recently a world for the purpose of legends reading and in all the battles I randomly chose to view the elves were outnumbering everyone else... Are not they a little bit overpowered?
2nd, about gobbos : gobbo mac gobbo has two children, one born from his union with gobba mcgobbo and one stolen from, say, the neighbour civ, as only one of them needs to eat, raids should suffice to feed him (working from the assumptions that stolen children dont make the bulk of the goblin civilisation) when gobbo macgobbo junior comes of age he goes to the yearly siege to happily slaughter and get slaughtered by the neighbouring civ. My theory : gobbos regulate there pop waging war to others who are better fighter and have a better equipment, even if they win it will be at the cost of huge loss. The question being, what is wrong with this theory?

137
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 09:55:34 am »
What is your theory on how battles are set and solved?

138
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 09:17:26 am »
I cant see toady hardcoding a whole lot of seeds, he is too smart to do this. Maybe it is the number of milliseconds since january 1st 1970 0000am
Then we would have a long enough seed I think... How would the worldgen impact combat in adventure mode for an example, would it be the same string of numbers for knapping, fighting, throwing..?

139
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 09:10:14 am »
The the map rejection thingie dont start again the worldgen process changing the seed, it only asks to start again from the point where it stopped, this way avoiding problems with futur combat logs, mineral and volcanoes and so on. Do you have any idea where the seed could be taken from?

140
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 08:43:30 am »
Han, about kiss
Do you have any idea why in
x = 69069*x+12345;
y ^= (y<<13); y ^= (y>>17); y ^= (y<<5); /* y must never be set to zero! */
t = a*z+c; c = (t>>32); /* Also avoid setting z=c=0! */

return x+y+(z=t);

X=69069*x+12345
Why 69069 and 12345? Can these numbers be changed or are they part of the algorithm? 12345 seems a bit arbitrary...

141
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 08:24:49 am »
So the mersenne twister spits out a long string of bits wich is saved (cant see where) then used for everything, from world gen, history AND combat. Wich way is most ressource expensive : keeping a loooong string of random numbers (first the 19937 bit seed, then each iteration result) or launching/stopping the twister whenever needed?furthermore, if the same numbers result in oddities during worldgen, wouldnt the same string make weird combat results? (During the siege of xor, 1487 elves were defeated by 1 human, one dwarf and an elf, no survivors)

142
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 07:18:42 am »
A lot of good things have been said about the MT but it has its flaws too, I read somewhere that it did not pass all DieHard and dieharder tests, I cant recall wich one it failed, could this have an impact on the number of rejects during world gen?
Why one would not use KISS wich is simpler and pass all tests? I dont understand how the period could be a problème since you could reseed it to have another string...

143
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 04:50:36 am »
How do you determine a?

144
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 04:33:18 am »
@starver : then you decide what will be in the square using the square value on the world map as well as the adjacent squares values. Seems pretty understable for df to work on a variation of this algorithm, still it need to use a lot of memory. One day shall we see df used to benchmark super computers?

Thief^, x,y and c being the seed values you could use anything for them, but there should be a floor limit under wich value are too small right?

As I understand it, after choosing x y z and c you use a fixed value for "a" dont you? Do this value stay unchanged as part of the algorithm or is it arbitrary determined with x y z c?
The process xor y with y<<13, xor it again with y >>15 and a last time with y <<7 use y value at first then the xored value from last xor is used for the next? I dont think I get what means the = relation in this case...
Spoiler: code paste (click to show/hide)

Could multiple runs of this algorithm be used to seed a mt?

145
#1880, you think that "prepared snail eyes" must be some kind of gooey carpaccio

146
DF General Discussion / Re: Mersenne twister in df
« on: May 31, 2012, 03:07:58 am »
I understand better the concept of cascading seeds, I stumbled across a pdf last night, "goodpractices" (which prng and how to use it in bioinformatic and genetic programing). When I read the excellent (at least for the neophyt I am) "a fild guide to genetic programing" I started to wonder about the gening of the starting genpool
And how you could avoid pitfalls. The prng seemed to be what I was thinking about but by then I did not know anything about them (and would you have asked me I would have been quite a skeptical asshat and answered "go get yourself a geiger counter and a ticket for tchernobyl if you want true randomness... Or record all your last pen and paper rpg night die rolls!")
To get back to my pdf "goodpracticeprng"
One important thing was about how you seed your prng. For a MT one could use another prng like KISS?

If anyone knows KISS around here, why hasnt it taken the crown from MT? It seems to be much less complicated (I dont understand what you do with y, are these ">>" meant to be read as bitshift?). Furthermore it seems to need a lot less lines of code.
On another track, I read about something called WELLRNG but they only said that it "could" end up being more used than MT)

147
DF General Discussion / Re: Mersenne twister in df
« on: May 30, 2012, 11:16:34 am »
You have a point, but when a program needs a random, say, percentile die roll, will it be running the twister all the time from start just in case the need arises or would it run it only to get enough bits to have an hexadecimal number in 0-64 range?

148
DF General Discussion / Re: Mersenne twister in df
« on: May 30, 2012, 10:59:23 am »
Then you can keep it running until you reach the 2^19937-1 iteration, but by then you would need a new seed to keep churning out numbers. And for the twister to work best you need the 19937 bit long seed to be perfectly random...
When the twister is used, does it run continuously,recording its results and looping around until 2^19937-1 or is it only "summoned" to churn out a set of 32 random bits (or more if needed)?

149
DF General Discussion / Re: Mersenne twister in df
« on: May 30, 2012, 10:40:15 am »
Starver, about the cascading seeds, do you think they are taken from the result of a first prng then run through a second? I dont understand how the cascade (or butterfly effect, as I understand it) would oc
cur.
Thief^, why xoring #1 with #398? Does it serve any purpose to xor with an element this far away along the string or is it arbitrary?
After the 624th iteration, to avoid creating the same string of random numbers, do you use it as the seed for the next batch?

150
DF General Discussion / Re: Mersenne twister in df
« on: May 30, 2012, 07:51:56 am »
399th? Isnt the array made of 624 elements (minus 31 migrating unused bits)?
If we start counting from the left the last element will be xored with the first one?
In the case of "hello starver" written with mountains chains or trees on a map, I think there is a difference, since the whole world is generated and can be view but the local areas would be generated when explored (wether in fort or adv mode) what would be the point of eating memory for parts of the world that will never be explored

Pages: 1 ... 8 9 [10] 11 12 ... 19