Author Topic: [pazuru] Baka anime name guessing game  (Read 63917 times)

Offline Klocknov

  • Member
  • Posts: 1176
  • 次に魅力を消えます。彼らの左側ですか?
    • Klocknov's Blog!
Re: [pazuru] Baka anime name guessing game
« Reply #640 on: October 13, 2009, 12:38:20 PM »







                 



I know names due to browsing anidb a lot, the picture side would get me stuck quick...
When Cookies become alcoholics the world has issues, oh wait that has already happened!
When I was growing up I wanted to become a queen, now that I did, I have to avoid brats chasing me with bats.
When the charm wears off, what do you have then?

Offline K7IA

  • Member
  • Posts: 884
  • :)
Re: [pazuru] Baka anime name guessing game
« Reply #641 on: October 13, 2009, 12:54:03 PM »
I know exactly what you mean!! In fact, I peeked at that game a few hundred times but the players are putting images that makes it almost impossible for the average guy to guess.

I will make them pay!!  :D

Offline Klocknov

  • Member
  • Posts: 1176
  • 次に魅力を消えます。彼らの左側ですか?
    • Klocknov's Blog!
Re: [pazuru] Baka anime name guessing game
« Reply #642 on: October 13, 2009, 01:01:43 PM »
Have fun with that :P

[guess] Yawara A Fashionable Judo Girl
When Cookies become alcoholics the world has issues, oh wait that has already happened!
When I was growing up I wanted to become a queen, now that I did, I have to avoid brats chasing me with bats.
When the charm wears off, what do you have then?

Offline Klocknov

  • Member
  • Posts: 1176
  • 次に魅力を消えます。彼らの左側ですか?
    • Klocknov's Blog!
Re: [pazuru] Baka anime name guessing game
« Reply #643 on: October 13, 2009, 11:59:12 PM »
[guess] Final Fantasy VII Advent Children
When Cookies become alcoholics the world has issues, oh wait that has already happened!
When I was growing up I wanted to become a queen, now that I did, I have to avoid brats chasing me with bats.
When the charm wears off, what do you have then?

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #644 on: October 18, 2009, 09:50:03 PM »
[guess] Irresponsible Captain Tylor

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #645 on: October 19, 2009, 12:45:47 AM »
Bwah, I was so close.  I had every word figured out except "Nobita" in "Doraemon: Nobita and the Legend of the Sun King".  What happens if we submit an incorrect guess anyway?

Edit:  The "Progress Bar" needs adjusted.  It seems to jump from two-thirds full to full instead of a smooth progression.
« Last Edit: October 19, 2009, 01:55:15 AM by Godfoster »

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #646 on: October 19, 2009, 02:06:31 AM »
[guess] Mobile Suit Gundam

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #647 on: October 19, 2009, 02:27:01 AM »
[guess] Magic Knight Rayearth 2


I'm sure that "2" is probably wrong.  =/

Edit:  Oh, nevermind, looks like it was right after all.  I was sure it was going to a letter or something because I thought "2" was too obvious.
« Last Edit: October 19, 2009, 02:32:59 AM by Godfoster »

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #648 on: October 19, 2009, 06:28:06 AM »
[guess] Birdy the Mighty Decode 02

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #649 on: October 19, 2009, 06:44:20 AM »
Err...

[guess] Birdy the Mighty Decode 02

Might I suggest a better randomizer?

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #650 on: October 19, 2009, 08:06:25 AM »
[guess] Future GPX Cyber Formula Zero

If you need someone to help with the PHP for better randomizing, I MAY have some free time if you're not sure about how to do it.
[encourage] enginarc

Offline K7IA

  • Member
  • Posts: 884
  • :)
Re: [pazuru] Baka anime name guessing game
« Reply #651 on: October 19, 2009, 08:34:41 AM »
@Godfoster, thanks

I appreciate randomization techniques, code implementation is a secondary concern.

Situation: How do I randomize a title selection process among a given range of titles without keeping history.

Masterlist consists of 3200~ titles.
Range is custom defined and index is ascending ordered, eg. from 50 to 600

Say randomly pick me a title between 50 and 600, but make sure it does repeat with the last 100 titles.

I want to try picking titles by generating a coefficient using the hour and day, to avoid repetition.

One step process is necessary, it should not keep a history.

I appreciate any help, thanks.

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #652 on: October 19, 2009, 10:08:36 AM »
[guess] Revolutionary Girl Utena

@Godfoster, thanks

I appreciate randomization techniques, code implementation is a secondary concern.

Situation: How do I randomize a title selection process among a given range of titles without keeping history.

Masterlist consists of 3200~ titles.
Range is custom defined and index is ascending ordered, eg. from 50 to 600

Say randomly pick me a title between 50 and 600, but make sure it does repeat with the last 100 titles.

I want to try picking titles by generating a coefficient using the hour and day, to avoid repetition.

One step process is necessary, it should not keep a history.

I appreciate any help, thanks.


"One step process" is misleading, as almost no function or method is actually "one step".  Without keeping a history?  Is there a reason you are setting that limitation?  PHP can certainly read/write files for such a purpose, or you could even be using a separate table in a database for "last 100 titles".  With these options, avoiding repetition is child's play.

Hmm...  Without keeping history...  You could adjust the custom range after every title selection:
  • Set Range: 1-32
  • Randomly select:  20
  • Set new range:  33-64
  • Randomly select:  33
  • Set new range:  65-96
Once you hit the end of the list, loop back to 1-32.  It's not pretty, but it would definitely keep repeats from occurring for 100 titles since you are moving in blocks of 32 titles.  Alternatively, to avoid repeats for potentially more than 100 titles:
  • Set Range: 1-32
  • Randomly select:  20
  • Set new range:  21-52
  • Randomly select:  33
  • Set new range:  34-65

Either solution wouldn't require you to keep a history on what titles have been selected.  You would only have to be able to read what the current range is, and optionally the index of the title that is/was selected.

Again, I'm not familiar with how you have your code set up, so I'm not sure if that would fall inside or outside your definition of "keeping history", but to me it would be tracking variables, either within code or within a session (or within a file/db if you needed something more stable than a session).

Care to elaborate on this "history" issue?
« Last Edit: October 19, 2009, 10:17:48 AM by Godfoster »

Offline K7IA

  • Member
  • Posts: 884
  • :)
Re: [pazuru] Baka anime name guessing game
« Reply #653 on: October 19, 2009, 11:59:17 AM »
Quote
One step process" is misleading, as almost no function or method is actually "one step".
[edit] I didn't say one step function.

"One step process" is misleading, as almost no function or method is actually "one step".  Without keeping a history?  Is there a reason you are setting that limitation?  PHP can certainly read/write files for such a purpose, or you could even be using a separate table in a database for "last 100 titles".  With these options, avoiding repetition is child's play.

Hmm...  Without keeping history...  You could adjust the custom range after every title selection:
  • Set Range: 1-32
  • Randomly select:  20
  • Set new range:  33-64
  • Randomly select:  33
  • Set new range:  65-96
Once you hit the end of the list, loop back to 1-32.  It's not pretty, but it would definitely keep repeats from occurring for 100 titles since you are moving in blocks of 32 titles.  

set range is keeping history :)

also iterating titles via this method will make guessing titles very easy, since the players will be able to easily estimate that next title will be within the next xx titles.



Alternatively, to avoid repeats for potentially more than 100 titles:
  • Set Range: 1-32
  • Randomly select:  20
  • Set new range:  21-52
  • Randomly select:  33
  • Set new range:  34-65

Either solution wouldn't require you to keep a history on what titles have been selected.  You would only have to be able to read what the current range is, and optionally the index of the title that is/was selected.

Again, I'm not familiar with how you have your code set up, so I'm not sure if that would fall inside or outside your definition of "keeping history", but to me it would be tracking variables, either within code or within a session (or within a file/db if you needed something more stable than a session).

Care to elaborate on this "history" issue?

history, in other words making a list of previously appeared titles leads to a limit in title pool thru exclusion.

So suppose your range contains 550 titles, everytime you show a title you deduct one title from the pool. Unless "only one person" plays the game continuously for 100 games, non-repeating randomization was not necessary (and I can not know who is viewing the game, thus players)

the game's randomizer uses mt_rand(range_min, range_max)

My reasons for not implementing a non-repeating randomizer is solely because a repeating title may be something new to somebody else and as I said I do not know who is viewing the puzzle.

I don't keep any ip addresses and won't, as a preference,there is no code that stores the visitors ip address.
« Last Edit: October 19, 2009, 12:09:45 PM by enginarc »

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #654 on: October 19, 2009, 01:33:29 PM »
[guess] Serial Experiments Lain

set range is keeping history :)

also iterating titles via this method will make guessing titles very easy, since the players will be able to easily estimate that next title will be within the next xx titles.
Setting a range is not keeping a history as no data is being stored in a non-volatile state (unless you ARE storing program variables in some stable form, like files or a database).  If it's not being stored permanently, it can't be viewed later, which would mean it can't be "history".  Unless your definition of "keeping history" differs from mine, in which case I would ask you to clarify.  I can't give good advice on something without good specs.

If you are worried about people being able to estimate, then randomize the source between loops (once the game hits the end of the list, shuffle the master list or a COPY of the master list and start from the first entry there).  That way, they can NOT estimate because the users no longer have a copy of your list to refer to.  Alternatively, if you were to go that route, you could just randomize the master list (or, again, a COPY that the program is reading from so that you still have an original, in order, master list), and iterate through it one by one.  You wouldn't have any repeats for a long time then.  Of course, this might work against your intention of having SOME repeats for new players, but in that case, consider this:  any title will be new to a new player.  Without repetition, any title will be new to all players.

Quote

Alternatively, to avoid repeats for potentially more than 100 titles:
  • Set Range: 1-32
  • Randomly select:  20
  • Set new range:  21-52
  • Randomly select:  33
  • Set new range:  34-65

Either solution wouldn't require you to keep a history on what titles have been selected.  You would only have to be able to read what the current range is, and optionally the index of the title that is/was selected.

Again, I'm not familiar with how you have your code set up, so I'm not sure if that would fall inside or outside your definition of "keeping history", but to me it would be tracking variables, either within code or within a session (or within a file/db if you needed something more stable than a session).

Care to elaborate on this "history" issue?

history, in other words making a list of previously appeared titles leads to a limit in title pool thru exclusion.
Neither method I described keeps a list of previously shown titles, though that would be my preferred approach (being a database guy, that approach is more natural to me).  And yes, the delayed repetition is the goal of a randomizer.  You don't want to roll Snake-Eyes every time in a game of Craps.

Quote
So suppose your range contains 550 titles, everytime you show a title you deduct one title from the pool. Unless "only one person" plays the game continuously for 100 games, non-repeating randomization was not necessary (and I can not know who is viewing the game, thus players)

the game's randomizer uses mt_rand(range_min, range_max)
mt_rand() to my knowledge is the right way to go, though it is troubling that the program still gets so many repeats or clusters of the same titles.  This says to me that the randomizer by itself is not doing a good enough job of shuffling the deck.  Once again, I'd recommend shuffling a copy of the master list once in a while, or simply using some PHP maths to shuffle the range you are searching.  Again, my preferred method would be to place titles on a "blacklist" for a certain number of rounds after it has been called just to be sure.  Though you can easily do this for the 3-in-1 games without keeping a blacklist - just check the second title against the first and the third title against the first and second while you're selecting them.  If they match, redo the mt_rand().

Quote
My reasons for not implementing a non-repeating randomizer is solely because a repeating title may be something new to somebody else and as I said I do not know who is viewing the puzzle.

I don't keep any ip addresses and won't, as a preference,there is no code that stores the visitors ip address.
Visitor info isn't really important for this type of randomization.  That would only matter if you were changing the rules of the game based on the number of players at any given time.  If that were something you wanted to do, you may be better off just tuning rule changes to certain times of day or for special team battles.


I'm quite tired at the moment, so I may not have been typing in the best of mind.  If I've said anything confusing, let me know, and I will try to explain in a better way.

Offline K7IA

  • Member
  • Posts: 884
  • :)
Re: [pazuru] Baka anime name guessing game
« Reply #655 on: October 19, 2009, 01:46:40 PM »
I have checked the logs, the game has repeated only a single title "Birdy mighty decode 2" in the past 50 games.

It does not seem to require a lot of attention for now.

Thank you for your concern, regards.

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #656 on: October 19, 2009, 02:04:53 PM »
I have checked the logs, the game has repeated only a single title "Birdy mighty decode 2" in the past 50 games.

It does not seem to require a lot of attention for now.

Thank you for your concern, regards.

I only offered because there seemed complaints without much explanation, and I like programming.  If the repeats aren't as frequent as I thought they were, then so be it.  All the same, you really should be checking for duplicates in the 3-in-1 selection code.  It'll only add a few milliseconds of execution time, and I'm sure psyren won't scream "fail" at you for those extra milliseconds if it means he doesn't see "Eve no Jikan" twice in the same 3-in-1.  ^_~

Offline K7IA

  • Member
  • Posts: 884
  • :)
Re: [pazuru] Baka anime name guessing game
« Reply #657 on: October 19, 2009, 05:51:15 PM »
I have checked the logs, the game has repeated only a single title "Birdy mighty decode 2" in the past 50 games.

It does not seem to require a lot of attention for now.

Thank you for your concern, regards.

I only offered because there seemed complaints without much explanation, and I like programming.  If the repeats aren't as frequent as I thought they were, then so be it.  All the same, you really should be checking for duplicates in the 3-in-1 selection code.  It'll only add a few milliseconds of execution time, and I'm sure psyren won't scream "fail" at you for those extra milliseconds if it means he doesn't see "Eve no Jikan" twice in the same 3-in-1.  ^_~

I don't feel offended by psyren, he is one of the good guys.

cheers,

Offline Godfoster

  • Member
  • Posts: 75
Re: [pazuru] Baka anime name guessing game
« Reply #658 on: October 20, 2009, 12:29:55 AM »
[guess] Hunter X Hunter Greed Island

Offline Klocknov

  • Member
  • Posts: 1176
  • 次に魅力を消えます。彼らの左側ですか?
    • Klocknov's Blog!
Re: [pazuru] Baka anime name guessing game
« Reply #659 on: October 20, 2009, 09:24:45 AM »
[guess] Hikaru no Go new year special

damn it looks like I got my guess as soon as the game ended...
When Cookies become alcoholics the world has issues, oh wait that has already happened!
When I was growing up I wanted to become a queen, now that I did, I have to avoid brats chasing me with bats.
When the charm wears off, what do you have then?