Tuesday, May 25, 2010

Tie Condition Eliminated

The tie condition has been eliminated. A point is now awarded based on 9,999 coin flips, so that there is truly a 50/50 distribution as opposed to a 50.4/49.6 like there was before.

Of course, the statistics calculated before still apply in principle. At one point I ignored the tie condition, but in my last post, since I realized it's probability was 0.4%, I mentioned it. The adjusted value of a 0.01% affect is 0.8%.

I'm going to make stats up 'til this point (10:30 PM Tuesday, May 25th, 2010) be listed under the "Pre-Alpha" section of some upcoming statistics page, and the ones after that under the "Alpha" section.

For now, stats are piled into one, sorry newcomers, your job is 0.4% harder, but I think you can live up to it.

Also, at the top of my to-do list is make the matches won/lost and percent available on the stats page. That should be even greater of a deviation than the number of points won, although exactly how much I haven't calculated yet, but I will.

Enjoy Psychic Ball!

Measured Affect of Mind on Matter by PEAR

So, I've been looking for some mind-matter data to help me get a bearing of, "is Psychic Ball getting the expected results, is this a fun game mechanic," etc. and I found this to be right up my alley.

From http://www.princeton.edu/~pear/pdfs/correlations.pdf (top of page 7)
Consistent with the terminal values listed in Table 1, the average slopes of these two patterns of
achievement, in units of bits deviation per bit processed, are roughly 1.3 × 10–4 and –7.8 × 10–5
respectively.
What that's saying is that people were able to affect the random distribution by about +0.013% when trying to increase the number of events and -0.0078% when trying to decrease the number of events.

I ran the calculation for Psychic Ball, and if you can have a +0.01% affect on the number of 1s that come up in 10,000 calls of rand(0,1) in the PHP script (which Princeton's PEAR suggests that you can), then you increase your chance of winning a point from 50.4% to 51.2%. (The 50.4% is actually because there is roughly a 0.4% chance of splitting 5,000 to 5,000, and right now I'm giving red the tie. I know, not fair, I need to change it. Don't worry, all the data is dated, so I can mark it and distinguish it when I make a change.)

So, the summary is this: Princeton Engineering Anomalies Research (PEAR) shows that on average, people can affect the distribution of random events by more than +0.013%. So shoot for a points won percentage of 51.2% or higher against the computer. Once playing other players is implemented, it will be a whole new ball game.

Keep playing Psychic Ball at http://psychicballgame.com!

Thursday, May 20, 2010

Psychic Ball Scores

So, I'll probably add this report to the a new page soon, but here's what we have so far:

Points WonPoints LostPercentGames PlayedUser
2692300.53913Guest
191918300.511922Zanthir
271 2380.5324 3 Rebi
52 700.4262 1Test
102 93 0.5231 1 Melissa


Sorry, Jing. You're not on the report, because you haven't played any games. I'm going to hold off on any statistical analysis of the data so far, because, well, there is so little, and I expect so much more. It would be interesting, though, to see if it made a difference whether the points awarded are based on one random event, or 10,000. I could always make another mode of play to test that.

Tell me what you think of the data so far. I know there is so little, but I just wanna chat with someone. :)

Tuesday, May 18, 2010

Site Map Up

Please start at http://psychicballgame.com/Home.php. The four working pages are:
  • Home
  • Play
  • Log In
  • Sign Up


Actually there are two Play pages, one if you're not logged in, one if you are. You can link to two broken pages right now, Log Out, and Account. Your logged in status will remain for ten minutes as is.

Enjoy the updates!

Reverse Look Up Table for Psychic Powers

Below is a table that allows you to look up your calculated affect on the probability of each coin flip that goes into determing every point. Since ten thousand (10,000) coin flips go into every point (the little red/blue squares at the center), a small affect on the probability can have a large affect on your probability of winning a point.

For example, a 0.05% affect on your probability of winning a coin flip translates into a 3.98% increase in your probability of winning a point.

Here's how you use it. Look up your calculated % chance of winning a point on your stats page (does not exist yet), and match that as closely as possible to the number at the right, under P(Z > z) = P(Winning a Point). Then go to the left in the same row to find your correlating probability of winning a coin flip.

Enjoy!

n = Number of Trials

p = P(Winning a Coin Flip)

E[X] = np

STD[X] = sqrt(npq)

z = ( 5000 - E[X]/STD[X])

P(Z > z) = P(Winning a Point)

10000

0.5050

5050

49.8075

-1.0001

0.8413

10000

0.5045

5045

49.8080

-0.8000

0.8159

10000

0.5040

5040

49.8084

-0.8000

0.7881

10000

0.5035

5035

49.8088

-0.7000

0.7580

10000

0.5030

5030

49.8091

-0.6000

0.7257

10000

0.5025

5025

49.8094

-0.5000

0.6915

10000

0.5020

5020

49.8096

-0.4000

0.6554

10000

0.5015

5015

49.8098

-0.3000

0.6179

10000

0.5010

5010

49.8080

-0.2000

0.5793

10000

0.5005

5005

50.0000

-0.1000

0.5398

10000

0.5000

5000

50.0000

0.0000

5.0000










*q = 1 - p



mysql> select * from games;
+--------+-------+--------+-----------+------------+-------+
| gameid | redid | blueid | redpoints | bluepoints | score |
+--------+-------+--------+-----------+------------+-------+
| 1 | 3 | 1 | 91 | 80 | 76 |
+--------+-------+--------+-----------+------------+-------+

The above means that game 1 was played by user 3 and user 1, and user 3 scored 91 points, and user 1 scored 80 points, and the last set was 7 to 6.

Translated this means the computer and I (blue and red, respectively) played the first game entered in the database, that I scored 91 points, and the computer scored 80 points, and that I won the last set 7 to 6.

This "last set" score at the end has been fixed to record a six digit code that is the set scores for all three sets (or four digit code if it was a two set match). I know, I may still need to explain how the game works, but that will come soon on an info page at psychicballgame.com. The score format is RBRBRB where the first two are the number of games in the first set for red and blue ... I digress. You don't need to know this anyways, because I'm going to parse it and turn it into pretty reports anyways.

So, please visit http://psychicball.com/LogIn.html and log in as "Guest" with password "password" to record some data for the user Guest. You will be playing against the user Computer, for now. You are Red, for score keeping purposes.

Please try to make red win. This will go a little way towards collecting useful data, as I am trying to show that by trying to make one side win, it affects the probability distribution of the random numbers generated. Again, I'm just using PHPs built in rand(0,1) function.

Enjoy, and look for a sign up page coming soon!

Sunday, May 16, 2010

Demo Up

Please visit http://psychicballgame.com/ and demo the game. Remember, focus your psychic power on getting the color of your choice to appear.

I just redid the calculation for 10,000 random events for determining one point, as the game is being played now, and if you can affect the probability from 50% to 50.5%, your expected value is 5050, which means you expect to win every point, and your stadard deviation is almost exactly 50. This meas you should expect to win 84.13% of the points.

For any math nerds, this is: for the number of coin flips won out of 10,000, X, with the probability of a coin flip being 50.5%, the probability of winning a point in Psychic Ball is

P[X>5000]=P[Z>1]=.8413

based on the area under the curve of the normal curve looked up in the Z-table of any given statistics book.

So, at some point, once I get user sign up and log in pages up, and a version that records your game data, I will make a conversion chart that will let you look up your measured affect on the random events. In this example, a win rate of 84.13% of the points gets converted into winning 50.5% of the random events I refer to as coin flips (actually the function rand(0,1) in php, zero bein for blue, one being for red).

So, just to be clear, those are the three things that are in line to go up on http://psychicballgame.com/. Again, they are
  • User Sign Up Page
  • User Log in Page
  • Psychic Ball with Database Records

Hope you enjoy it so far!

Thursday, May 13, 2010

Game Mechanics

So, you're a non believer, huh? Well, here is one study that suggests there might be some reality to the existence of psychokinesis (PK) by Princeton Engineering Anomalies research project of Princeton University (1997).

There is that, and then against it is that episode of Myth Busters that proved it is a myth. No, just kidding, I don't remember what kind of psychic ability Myth Busters was trying to disprove, but still, this project will be its own little study into the apparent phenomenon.

I ran the numbers real quick, and if you're just 51% likely to win a coin flip (random generation of a 1 or a 0), then you probability of winning a point, or winning at least 501 out of 1000 coin flips, becomes over 70% (about 71.6%). That makes a big difference. So, the probability of winning a game goes up even higher, and a set even higher, and a match even higher (I'm too lazy to do the math right now, I have a game to make!)

Ok, if someone wants to do the math, that is another way to contribute. I would very much appreciate it.

So, if someone does have an advantage, it should become apparent. I hypothesize that people will be able to beat the computer consistently. This alone will be a great achievement if it is true. Further, I hypothesize that some players will be better at this than others, and will be able to consistently win against other players. Lastly, if I could show that this is a learnable skill, that players actually get better at this game the more they play, that would blow my mind. I would love that so much.

In order to track this last part, it will be vital to make sure I date stamp all game data recorded. So, right now I'm just getting the database and game scripts set up. I hope I can get something done before someone needs my help doing statistics homework ;).

Until next time!

Tuesday, May 11, 2010

Psychic Ball

Welcome to the Psychic Ball blog. Psychic Ball is currently under development, but will be hosted at http://www.psychicballgame.com/. This week so far, I've set up the web server, created some proof of concept graphics, and got my domain name up and running. You can see the domain linked up to my web server at the link above. Woooh. *wave hands*



We're looking for contributors from many disciplines. We need programmers, writers, character designers, story writers, game layout and graphic designers. In addition I still want to talk to someone (I'm thinking any psychology student who's done a study) about relevant data to track, what kind of p-value is a good target, stuff like that. Although I can always set it up later, I know I need to decide before hand how much data I'm going to look at.



The reason I'm interested in tracking data so much is, I've seen multiple references which I'd like to site, though I don't know them off hand, (I think there are some in Amit Gaswami's The Self Aware Universe). So, I guess I'll need to offer a one player/one team mode, that you play by yourself, or with multiple people on the same team, and track the results of those random number generators. Then in the versus mode, which is the game I'm really interested, I want to track data to try to show that some players definitely have a stronger ability than other. Unfortunately there is no way to tell whether it is because they always play with two psychics focusing on them winning at a time, or what have you, but it would still be interesting.



The way I want to award points is one thousand random ones and zeros generated. If it is in your favor (more ones for red team, more zeros for blue team) then you get the point. Get four points by two to win a game, and six games by two to win a set. Two out of three sets wins a match. (Sound familiar? It should if you know how to play tennis.)



If a player can consistently get even about .1% in their favor, they would be able to sweep the game, getting almost every point. Particularly in a one team game, when they don't have psychic opposition, if I understand what I have read about some experiments done, and their repeatability, a player should be able to consistently beat the computer. Any player who tries. So, I guess a one player game would be a good place to start experimentation, because it is closer to the reference point I'm coming from.



I guess only time will tell if this is going to be a fun game that also helps people develop their psychic abilities or not. I think I'm going to have fun playing, and that's really the most important thing. I'm so excited to play. Let's see how fast I can get a prototype one player proof of concept up and running, shall we? Oh, and anyone who wants to contribute, comment and let me know how to contact you. I'd love all the help I can get.