Jump to content
BrainDen.com - Brain Teasers

unreality

Members
  • Posts

    6378
  • Joined

  • Last visited

Everything posted by unreality

  1. currently there are 6 algos ready to go for T3: phillip! plasmid! unreality! darthnoob! dawh! MrApple! I know Izzy is planning to work on hers; I haven't heard from Medji; jazzship and Framm18 are new to the game but I'm not sure at what point in progress they have made; I know that SomeGuy is interested but I haven't heard from him in some time since he asked some questions about how to program it, so maybe he has made some progress; JarZe is planning on using his original jarze unless he thinks of something in the meantime The ones in the above that I currently haven't had contact with in a while are jazzship, Framm18 and SomeGuy, so I'll give them a quick PM to see where they are at Thanks everyone for doing this crazy thing for these tournaments ;D
  2. unreality

    plasmid: I remember reading something about that in a Martin Gardner article a while back. They had an algorithm contest similar to ours, and a t it-for-tat strategy won I believe; it did whatever the other prisoner did the previous round
  3. unreality

    the same argument doesn't really apply. God created the Earth in 7 days, not the universe. It's implied that the universe already existed, along with god, and that neither created the other, at least that's my understanding of it. As for the scientific explanation, I don't think we're quite there yet as to how existence itself exists (that's more of "metaphysics"), but we do have fairly concrete evidence from multiple directions that the universe is expanding outward and has been for its lifetime. That suggests the Big Bang but we're still making advances in that field. It's an ongoing process and a relatively modern endeavor to understand these things with scientific rigor - and very hard, as you might imagine. But we're getting there
  4. unreality

    oh we know how the world was created. http://www.wisegeek.com/how-was-the-earth-created.htm http://www.mcwdn.org/MAPS&GLOBES/Earth.html http://en.wikipedia.org/wiki/History_of_the_Earth want more links?
  5. unreality

    It really depends on what I know about the other person
  6. i haven't been on today and I haven't had time to work on darth's algo but soon we'll hold T3... hope everyone's making good progress on their algorithms
  7. unreality

    haha my friend just bought a retro N64 and we were playing 007 like way back when times
  8. jazzship: it's fairly simple to do that... some people use some if/thens to figure out, or there's an arithmetical trick: (a[i-1] - b[i-1] + 3)%3 the above will evaluate to 1 if you won the previous round, a 0 if the previous round was a tie, and 2 if you lost
  9. jazzship: it's never too late! ;D Framm 18 just joined as well, and most people haven't submitted their algos yet, so it's all good. If you have time, take a quick look over the previous pages of this topic to get a gist of the game up to this point
  10. unreality

    that is a very interesting property... is this a known law or is there a proof somewhere of it?
  11. yep edit: regarding the izzy/izzy1 thing, Darth was inquiring about izzy, but Izzy just described izzy1. Izzy, I think he wants to know about the original izzy from T1 (lol there were a lot of izzys in that sentence) Oh and there may have been scenarios left undescribed in her original description of the algo (such as special cases, ties, etc) but somewhere in the PM conversation I asked her how she wanted it to behave in those circumstances
  12. yeah I agree to an extent, and here's what I think should be done... I think at least one of the following two changes need to be implimented: (1) make ties be within 0..2 wins instead of 0 or 1 OR (2) make i=0 not count I'd prefer the first one tbh yeah you could, but the idea is that a defeator has to beat its target 100/100 times... so if a way can be found to do that and still sample from b, that'd be a good way of making it dynamic hahaha nice! The original point I was going for in the asterisk was that knowing the behavior beforehand and how his b is based on your a, you could force something like this, but then I got distracted by variable isomorphism and just kind of wheeled off haha. But yes that one you just wrote is the one I wanted to write hehe Nice! that was just a space-saving trick to get all that on one arithmetic line... firstly, this part: ((a[i-1] - b[i-1] + 3) % 3) will equal 0 if last round was a tie, 1 if you won last round, or 2 if the enemy won last round. Dividing that by two will equal 0 if last round was a tie or a win, and 1 if last round was lost. Subtracting that from a[i-1] is the same as a[i-1] if last round won or tied, or one prior if last round was lost. I'm not sure of the context of the program but it seems strange that I didn't add 3 and then mod3, to make sure that if it went from 0 to -1 that it would wrap around to 2, unless for some reason it was known to stop when it hit rock - and looking at the code, that is the case
  13. awesome new avatar :P Hehe

  14. I don't think so because: any anti-program is static, that is, it will be the same every time it's run no matter the opponent [there is one case where this would not be true but it would be hard to make, see asterisk below]. Thus, the static pattern will either seem pseudorandom, and thus do about average OR it will be some fairly simple pattern (as in pattern_seeker_defeater) that may happen to luckily beat the one algo it's designed to, but a pattern that all the other pattern seekers would probably beat. So if it did win against others it would be purely coincidence I think. Let's find out: So it didn't do horrible, but it got 12 points and the average score was 13.5, so not very good either * if (i==0) return ROCK; return (b[i-1]+1)%3; the "static" jarze_defeater: if (i==0) return PAPER; return (a[i-1]+2)%3; which is identical to: return (2*i + 1)%3; (static means an algo uses just 'i' and 'a' (or degeneratively, just i) to determine its move and thus uses the same moves independent of its enemy. Dynamic would mean it uses 'b' in its process and thus takes into account the enemy's moves. ) In attempting to write this, I thought about how I could do it, and I realized it is NOT possible to write a dynamic defeater of "jarze", because jarze is the opposite of static - it ONLY uses b to determine its move (except when i==0 of course) and never uses 'a' (its own moves). Jarze's next move is based entirely on its 'b' array, or YOUR 'a' array... let's say you're writing 'Defeator' specifically to defeat 'Algo' VARIABLE ALGO'S VARIABLE DEFEATOR'S VARIABLE round number i i array of algo's moves a b array of defeator's moves b a whatever ALGO uses in determining its next move, DEFEATOR has to use the compliment of that in determining how to beat ALGO's next move. So if ALGO uses only i and a, or only i, ("static") then DEFEATOR must use its i and b variables. If ALGO uses its b variable ("dynamic") then DEFEATOR uses its a variable. So the only way to make DEFEATOR dynamic is if DEFEATOR can use its 'b' array which means ALGO must use its 'a' array. so a jarze_defeator will always be static, but it may be possible with other algos... hmmm...
  15. I wrote "pattern_seeker_defeater" and this is how it beat pattern seeker:
  16. but it's the only the first round (i=0) where both programs are blind and just have a set move. After that, they can start even then to try to predict patterns. If the first three moves didn't matter then everyone would have their programs BS the first three rounds and so pattern detection wouldn't be able to kick in until some rounds after that, you see? It's arbritration... I think it's a good idea to make i=0 not matter, but after that it's strategy, fledgling as it is for those first few rounds, but it develops into more knowledgeable strategy. You could push it farther back but two rounds would just be wasted. If any rounds are omitted it should be and only be i=0
  17. haha yeah Vector is pretty much like ArrayList from what I've gathered yeah I was thinking that too, but I think it should be just i=0 that doesn't count (after that it's strategy). Does anyone else think i=0 should be omitted from the scoring?
  18. now here's a challenge: design a sequence of moves to beat patternSeeker 100/100 times. It sounds daunting but ANY (deterministic) algo can be beaten if you know its code beforehand. The easiest way is to run its algorithm or an isomorphism of it to find out what it will do next, then play what beats that. The interesting thing is that this can always be degenerated into a static sequence of moves (maybe too complicated to be a simple function of 'i' though). I wonder that sequence is for some algos... the challenge is to try to figure that out beforehand (as I did with jarze_beater) and tomorrow I'll think more about this and try my hand at some of the algos. Anyway, g'night
  19. unreality

    I registered an account there called "notreality", it wouldn't let me be "unreality" for some reason haha
  20. finally I have written "unreality!" I really have no clue if the algorithm will do well but I think it will, and it's fairly flexible. now that I've finished that, and am just waiting for everyone else to submit ours (I think we should do T3 sometime in the first week of january, probably not after the 6th or 7th), my attention can go to more academic pursuits. But first: Advertise! We want lots of people to contribute to this... there are lots of people on Brainden that like to code as a job/hobby or might be just interested in math/algorithms/compsci. You guys probably know a lot more of these people here on Brainden than I do... so please, everyone should PM at least ~5-7 people and we'll see what kind of crowd we can get Anyway, I was thinking back earlier when someone (I think Izzy?) asked to see an algo (I think it was patternSeeker) fight itself. I was thinking about this in the shower about how my intuition said that it would be a tie, well it can be proven with mathematical induction that it will always be a tie if a deterministic algorithm (which will be defined as an algo that makes its round-by-round decisions purely based on the round count (i), the array of its own moves (a) and the array of its enemy moves ( fights itself. For i=0, the algos by definition will make the same locked-in decision. Now assume that i=k and the game has been a tie up to this point. From this knowledge we can infer that both algos will make the same move because: * the round is the same (the 'i' variable is the same for both algos) * the a/b arrays are identical. Obviously the first algo's 'a' array equals the second algo's 'b' array, and the second algo's 'a' array equals the first algo's 'b' array, but because the game has been a tie up this point, the algos have done the same moves, and thus all four a/b arrays present among the two algos are identical. Because the algos make their decision based on i,a, and b, and these data are identical for both algos, they will make equal moves again, and thus i=k+1 will always be a tie. QED Another digression, about hand-crafting an algorithm specifically to defeat an algorithm you know it will be facing. Consider "jarze": else if (algoNum==10) // jarze { if (i==0) return ROCK; return (b[i-1]+1)%3; } how could I make a "jarze_beater" whose entire task is to defeat "jarze" and "jarze" only for 100 out of 100 rounds? I think I have it, but I haven't tested it yet: if (i==0) return PAPER; return (a[i-1]+2)%3; put even simpler: return (2*i+1)%3; this is the 102 102 102...etc pattern.
  21. did you see the analysis of random/pseudorandom programs... with the system of 1 point for a win and 0.5 points for a tie, a pseudorand program will on average be at the average score, ie, (n-1)/2 as for why the simple pattern programs like RPS do so good, I think it's because they excel against the weaker ones that roughly look for the most used moves and so end up failing... for example, say that we have two algos: RPS, which plays RPS forever in that order (ie, "test2") and MV, which plays whatever defeats the enemy's most used move. There are three different states of play then. The first is when i, the round number, equivalent to 0 in mod3, and has played an equal number of Rocks, Papers and Scissors. Then how MV plays depends on how it handles ties. The second scenario is if i is equivalent to 1 in mod3, so that RPS has previously played perfect cycles and then a ROCK. In this case, MV will see that ROCK is most played, and play PAPER. RPS also plays PAPER and they tie. In the third scenario, i is equiv to 2, mod3, and RPS has previously played perfect cylces then ROCK then PAPER. Once again, there is a tie between RPS' most used move, and so it comes down to how MV handles ties, but either way MV will play what beats ROCK or what beats PAPER, and thus will play either PAPER or SCISSORS, both of which either lose to or tie with RPS' next move, which will be SCISSORS. So you can see that the only way MV can get a win in against RPS is when it's faced with a three-way tie and makes an arbritrary choice of some sort. That's only an analysis of one type of program, but other non-pattern-seeking programs behave differently and some defeat the RPS ones, some don't, but in general it seems that the simplicity of the RPS pattern can often overcome the complexity... except where there's special ingenuity in the complexity like in the pattern-seeking programs, which can easily defeat the RPS tactic
  22. is anybody still interested? I think it kind of flopped when we realized that this type of game is more suited to real life, but if people are still interested i think we should attempt it again
  23. the number on the far right is an algo's logarithmic score. It starts off at 0, and after any game in which your wins exceeded the enemy's wins, your score was incremented by the base 10 log of the difference between the two win counts if (oneWins > twoWins) logscale[nn] += Math.log10(oneWins - twoWins); if (twoWins > oneWins) logscale[nnn]+= Math.log10(twoWins - oneWins); edit: so it's a rough representation of how well you defeated the enemies you did defeat, which you can also glean by looking at the win/tie/loss counts it also gives now. I'm thinking that ties in the point system (for example, there are four algos all with a score of 11.0) should be resolved by who has more overall wins, or who has a higher log score, not sure which
  24. here's the new code and here's the tail end of what it produces, from T2 results: Type y for analysis y [Algos: 22] [Games: 231] [Average Score: 10.5] [Sdev: 2.796] [MAD: 2.045] From Greatest to Least: darth1: 16.0 [1023 wins, 642 ties, 435 losses] 23.539 patternSeeker: 15.5 [1037 wins, 588 ties, 475 losses] 23.529 backatyou2: 15.0 [912 wins, 533 ties, 655 losses] 19.209 mrapple1: 13.0 [751 wins, 720 ties, 629 losses] 11.192 test2: 11.5 [687 wins, 646 ties, 767 losses] 11.189 jarze: 11.5 [718 wins, 796 ties, 586 losses] 15.294 medji1: 11.5 [771 wins, 612 ties, 717 losses] 11.814 izzy2: 11.0 [736 wins, 609 ties, 755 losses] 9.625 medji: 11.0 [536 wins, 998 ties, 566 losses] 10.955 medji2: 11.0 [647 wins, 704 ties, 749 losses] 7.633 fib2: 11.0 [667 wins, 714 ties, 719 losses] 7.964 unr2: 10.5 [984 wins, 557 ties, 559 losses] 16.040 unr3: 10.5 [776 wins, 652 ties, 672 losses] 11.734 izzy1: 10.0 [722 wins, 617 ties, 761 losses] 13.121 apple4: 9.5 [697 wins, 663 ties, 740 losses] 8.291 darth3: 9.5 [720 wins, 477 ties, 903 losses] 14.640 mr_apple_pi: 9.0 [677 wins, 713 ties, 710 losses] 7.577 unr1: 8.5 [663 wins, 715 ties, 722 losses] 8.184 phil: 8.0 [706 wins, 623 ties, 771 losses] 7.509 izzy: 7.5 [725 wins, 627 ties, 748 losses] 9.322 phil1: 6.0 [435 wins, 822 ties, 843 losses] 4.631 phil2: 4.0 [315 wins, 362 ties, 1423 losses] 0.000 The biggest blowout game(s) was(were): test2 won 100 games and izzy1 won 0 ~ there were 0 ties test2 won 0 games and mrapple1 won 100 ~ there were 0 ties test2 won 0 games and darth1 won 100 ~ there were 0 ties test2 won 0 games and unr2 won 100 ~ there were 0 ties backatyou2 won 100 games and phil2 won 0 ~ there were 0 ties phil2 won 0 games and unr3 won 100 ~ there were 0 ties Type y to play again n Thanks for playing!
×
×
  • Create New...