Results 11 to 20 of 30
Start with writing a program to shuffle cards. That part is hard enough. Once upon a time, I wrote a program to shuffle cards, and it removed any frequencies of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-24-2006 #11
Once upon a time, I wrote a program to shuffle cards, and it removed any frequencies of repetition and produced a naturalized random. I started by drawing a random number between 1 and 100, then a second number between 1 and 10. I cut the deck at 31 cards and loaded that into my right hand array, 21 into my left hand array, and moved the cards from the right hand array into the left hand array based upon the random number between 1 and 10. The random number between 1 and 100 is used to determin how many times to shuffle the deck, and put into a loop. Instead of drawing a number between 1 and 26, or 1 in 52, I drew two numbers between 1 and 3 every time the loop reaches the point at which it will fill the first Deck array that was cut, one for the left hand, one for the right hand array, and the loop is within the first loop of how many times to shuffle. This left hand/right hand controller switches from the left drawing a random number of 1,2, or 3, and placing that number of cards into the deck array. Then the right hand does the same thing, and this alternation is committed to until the full deck is back into the deck array. The cutting of the cards is then repeated after the counter is deincremented for the main number of times to shuffle loop.
If you've ever physically shuffled a deck of cards, then you know that you almost never see every other card go to either the absolute left or right hand, and there are always some left over because the deck wasn't cut exactly. So, the program is written to insure the deck is never cut exactly, and the cards are shuffled imperfectly.
This is the program that is needed to randomly name files and directories, and insure that no-two computers are the same. Other than that, any card game can use naturalized randoms with it.
With video games, you can position enemies prior to game play by loading an array of possible starting positions for the enemy game characters. I don't know if you ever played Starwars Battlefield II, but that game has some serious issues in character placement. The appear out of nowhere, and that's really the bad part. I'd use that radar feature, that they always place in games to tell you where the enemies are, to uh, make sure that the game player doesn't see where they are coming from, and that they don't appear out of nowhere.
You can see an example of how randoms can be utilized in cross multiplication of randoms to produce a naturalized random here at this link:
Every time you close the window it opens, and click on the link again you will find another puzzle. There are over 40 thousand different puzzles, but only 99 answers. Sorry for any inconvenience, but it only works with Microsoft's Internet Explorer.
Now, if you add up any row, column, or diagonal, which is marked out and colored so that it's easy to follow, I always maintain the upperhand, and know the answer you'll find on your calculator.
- 08-24-2006 #12
- Join Date
- Feb 2005
- Luton, England, UK, Earth
Now, is it me or does this look like spam?
Someone who has no posts on the forums, obviously clued up about security matters, with links to an app they made?
Ah well, could be wrong...
- 08-24-2006 #13
I don't have the foggiest idea what the point of this thread is.Registered Linux user #270181
TechieMoe's Tech Rants
- 08-24-2006 #14Originally Posted by techieMoe
Just a thought: the weakest link in computer security is the user. You can encrypt everything like crazy, have 20+ character long passwords with random letters, numbers, etc., but if you can convince some secretary that you need file X, well, you've got it, encryption or no encryption.
- 08-25-2006 #15
- Join Date
- Aug 2006
on my pc it says this guy has 0 posts 0.o. 0.o
- 08-25-2006 #16
Coffee Lounge posts don't count towards a person's post count.
Okay, first off, I hate to mention it, but probably very few of us have IE to view your app there .
Secondly, the reason why we're not taking you seriously is that you're being extremely long-winded and unnecessary over the issue. While (I'm sure) a fascinating topic for a master's thesis, it is extremely impractical and is an extremely unnecessary issue. Have a firewall, be a smart user, and you're pretty much perfectly safe. Theoretically, you're not, but realistically, you are. Find me a person who has been "hacked" or gotten a virus, and I can all but guarantee you that they either a) ran a program they shouldn't have, or b) did it themselves.
- 08-25-2006 #17
- Join Date
- Feb 2005
- Luton, England, UK, Earth
Cabhan, don't worry, it's spam
- 08-25-2006 #18Originally Posted by Cabhan
If you want a perfect model of randomness though, bus timetables are the way to go. The times are there on a table (your encryption key) but the buses are subject to the randomness of traffic along the way, so they never roll up on time. I speak as one who knows ...
As for this thread ... remember that bulls**t baffles brains.I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
- 08-25-2006 #19Originally Posted by onlinebacon
But then, I'm starting to believe that most of you making comments, aren't even programmers.
- 08-25-2006 #20Originally Posted by The Flavored Coffee Guy
Normally someone posting to the coffee lounge says, 'Hello ...' and gives us some brief background about themselves.
Zero posters with very long first posts to the coffee lounge make us think the following:
- you might be a spammer (personally I don't think so);
- you're a troll of some sort, and trying to annoy us (could be);
- you're a twit.
Again - sorry if this is offensive, but what are you trying to achieve? Threads like this usually get locked, and we all know it.I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso