Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

Recommended Posts

Posted

Not sure if I've posted this before. But when designing the new "Random Game" code for Evo, would it possible to have some kind of weighting system for their selection?

Problem is - when do this on present system, nearly always get Commodore 64 games boot. I'm thinking this is because there's thousands of C64 game files (many many more than most systems) thus I'm assuming that if just 'stright random' odds are that C64 will get picked.

Either an auto-generated or user-set weighting would suffice I'm thinking...

Posted

Not sure if I've posted this before. But when designing the new "Random Game" code for Evo, would it possible to have some kind of weighting system for their selection?

Problem is - when do this on present system, nearly always get Commodore 64 games boot. I'm thinking this is because there's thousands of C64 game files (many many more than most systems) thus I'm assuming that if just 'stright random' odds are that C64 will get picked.

Either an auto-generated or user-set weighting would suffice I'm thinking...

That's just probability though when it comes to RNG's. I guess you could influence it with a sort of "weighting system" that you mention, i would rather think of it as a "priority order" but i hear ya! But, and i say this as precautionary - to get truly random numbers from many systems based on rom count, user priority, favorability etc would take some doing! I know we have some of the best and keen programmers here but that doesn't necessarily make them algorithmic genii :P No offense intended if any of you are ^_^

It's a good idea though!

Posted

Maybe just based on number of roms? I'd have to dust off my GCSE maths book, but say N64 has 5 ROMs and PSX 10 you could select rom at random then if system=psx give it a 50/50 chance of booting - if doesn't boot, rinse and repeat.

Or am I falling into the murky hole of the Gambler's Fallacy?

Posted

If one system has a great majority of the ROM count, then it is more likely to come up in a random selection because the deck is already stacked in its favor.

One of the features I like about the screen saver function for displaying random MAME roms is the ability to have it select randomly from my Favorites instead of all ROMS in the set.

Posted

That was my point and the problem exactly, Draco, albeit a little more succinctly put! The Plain English award, 2015 goes to Mr 1962 :)

Posted

If one system has a great majority of the ROM count, then it is more likely to come up in a random selection because the deck is already stacked in its favor.

One of the features I like about the screen saver function for displaying random MAME roms is the ability to have it select randomly from my Favorites instead of all ROMS in the set.

That was kind of the point i was trying to make. Probability can't be influenced much.

For instance, you have 65,000 C64 roms, you have 1,000 MAME roms - it doesn't matter how clever the algorithm, it is still 65 times more likely that a C64 rom will be chosen, OR, 1 in 65 will be MAME. Of course when you add more systems to the mix, things get a little bit more complicated, but the formula remains the same. Probability is a factor that many in history have wished to conquer, but no one has...

Posted

Hmm.. not sure Dazzle... As my post above, you would just pick a rom then do a bit of math around whether it's booted or not. You'd analyze the number of roms for each system. Let's take your example, adjusted:

Mame = 1000

SNES = 5000

C64 = 10000

then

a = lowest number of roms = 1000

You'd then calculate a weighting for each system which would be a divided by number of roms, giving:

Mame = 1000/1000 = 1

SNES = 1000/5000 = 0.2

C64 = 1000/10000 = 0.1

Then you'd apply the weighting to whether the rom is booted or not, thus leveling the odds according to rom numbers. So Mame roms would boot 100% of the time and C64 10% of the time. If not booted - will repeat the algorithm.

Or am I missing something?

Posted

We are talking about the state of the current system, not the wished for system. No weights, just pure randomness. Would be cool if it could be done.

Posted

Or maybe, say, pick the system randomly and then pick the rom? Then all of them would stand an equal chance. ;)

If you had four systems, the probability of a c64 rom would be 25% regardless of how many roms it has, no?

  • Like 3
Posted

Or maybe, say, pick the system randomly and then pick the rom? Then all of them would stand an equal chance. ;)

If you had four systems, the probability of a c64 rom would be 25% regardless of how many roms it has, no?

That is a much better approach yes, and you're right - it would give each system an equal chance of being chosen, then to randomize the roms in the randomly chosen system. This should give more varied results, but what i am getting at, is that when you start to try and influence probability/chance then it instantly becomes non-random - there is now structure - no matter how "loosely" :P

I am totally +1 @Adultery for the purpose of delivering a solution to what you need though stigz, even if it goes against my own principles of what "random" is :D

Posted

OK, but let's say we have a counter that loads based upon the systems emulated, puts a digital "tick mark" when a game is selected randomly from that set, then randomly selects from the remainder, placing a tick mark in each system and selecting from the remainder, until it gets to the end of all systems or the machine is restarted and the "tick sheet" is disposed of.

Posted

Sounds complicated ^_^ which again highlights my point - the more you try to control chaos, the more you will need to. More rules will need to be implemented to satisfy more needs until eventually all you have is anything BUT random - a defined set of rules, designed to satisfy multiple outcomes/trends. That is not random! :P Chaos cannot be influenced for that is the very nature of it.

Posted

Now we're getting into IPod "random" territory! How about an algorithm that takes the number of times a game's been played and slightly increasing the odds of its being chosen? I quite like the Ipod random idea (other music players are available). And.... you wont hear me big-up Apple very often!

:)

Posted

Sounds complicated ^_^ which again highlights my point - the more you try to control chaos, the more you will need to. More rules will need to be implemented to satisfy more needs until eventually all you have is anything BUT random - a defined set of rules, designed to satisfy multiple outcomes/trends. That is not random! :P Chaos cannot be influenced for that is the very nature of it.

Take yer point, Dazzle. Just getting a bit sick of playing C64 games :D

Posted

How about just selecting from those that one puts in their Favorites and call it a day?

Posted

Take yer point, Dazzle. Just getting a bit sick of playing C64 games :D

hehe i knew that from your first post :P I just wanted people to grasp that randomness is a power/force that is meant to be out of our control.

I do think Adultery gave the simplest most effective solution so far though. When you start adding counters/stats/excludes/includes etc like i said, it's no longer random, it's an equation :)

Posted

It's the most practical from a programming standpoint too.

We should split these posts out to a new thread. ;)

Posted

We should split these posts out to a new thread. ;)

I thought that too ^_^ It has sparked a whole new debate so probably deserves it's own thread :)

Posted

Anytime you vote for me it counts han! :-)

  • Like 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...