Over what time period is 'Today' measured for the Game Center leaderboard? - game-center

Does anyone know over what time period the Game Center leaderboards measure 'Today'? In other words, if I play a game and get a high score for 'Today', at what time does that score no longer appear in the 'Today' category?

12:00 AM PTZ <== that's where apple is

"Today" in Apple's Game Center really means the most relevant score in the past 24 hours (even though this can easily span more than one actual day).
Here's a reference to the time scope documentation for GKLeaderboardTimeScopeToday:
Each player is restricted to scores recorded in the past 24 hours.
http://developer.apple.com/library/ios/#DOCUMENTATION/GameKit/Reference/GKLeaderboard_Ref/Reference/Reference.html#//apple_ref/c/econst/GKLeaderboardTimeScopeToday

Related

Calculating "Reliability" of Cricket Stats

I'm not a statistician so please forgive the (mis)use of terminology.
I am calculating strike rates for batsmen in cricket. For non-cricket fans, this is the number of runs scored (broadly the same as points in other sports) per 100 balls faced.
So if a batsman has faced 100 balls in his career and scored 150 runs his striker rate would be 150 (runs/balls*100).
I now want to calculate how likely it is that the stat is an accurate representation of the batsman's ability.
The more balls batsmen have faced the more likely it is that the resulting stat is accurate but how do I calculate how reliable it is?
Any help would be appreciated.
Thanks
You have a point estimate, and a confidence interval can help you quantify your uncertainty. For your example of 150 runs in 100 balls, is there a certain number of balls per run? If so, you can definitely create a confidence interval using the standard formula and choose your level of confidence.
E.g. X bar +/- t_{99, 1-alpha/2} s/sqrt(n) is a 1-alpha/2 level confidence interval for the average hits per ball
Multiplying by 100 gives a CI for the average hits per 100 balls
Unfortunately, if you have no other information than the aggregate 150 runs in 100 balls, there is not much you can do

How to calculate a new player winning probability with expert level player

Let's say I have a online game where users can play each other. I have list of players, all players categorized as experts, average, below average. A new player wants to play this game, and the system choose expert level player against new player. what would be the winning probability of the new player?
ex: expert player data looks as:
total games: 45,
win: 30,
draw: 10,
loss: 5
Is it possible to do probability between new player vs expert player? If yes, what statistics can be considered?
Thanks in advance
I would take a subset of the data which corresponds to expert vs. average games
If the expert in question has enough data (do a binomial test to check if his win rate is statistically significant), then you can rely on his/her data alone. Eg If this particular expert has played 100 games against average players and won 80, that's significant, and you can say he/she has a 80% change of winning
If the expert doesn't have enough data (ie to be significant), you can combine data from ALL expert vs. average games to compensate, although this raises another question: how did this player get awarded the expert rank if we believe there aren't enough games to determine this?
I believe the main issue here is that you reduce all possible skill levels to 3 (expert vs. average vs. below average), whereas in reality there might be more granularity to how good or bad people are, thus your model might be over simplistic. Introducing more levels would help address that issue (eg 5 levels doesn't seem like too much for people to grasp and might already perform better than 3). Alternatively you can also try to calculate probabilities based on more detailed properties (eg win rate, # days user has been playing, age, gender...) even if it's something you only keep to yourself (ie players only see the n ranking levels but you have more detailed properties to do your calculations).

How do I create an animated 3D day night cycle in godot?

I am trying to create a 3d game in godot and I have been wondering how I would go about creating a day/night cycle. I would assume I would use shaders but I have found no resources on the subject. My idea to have a directional light as the sun but from there I do not know where to go. EX. how would I know when the sky should be a certain color?
Thank you in advance.
This is a very broad topic and therefore as a whole not very suitable for a stack overflow question. I'll focus on the last part of the question ("how would I know when the sky should be a certain color"), because that is a well focussed question. You will have to figure out the rest on your own (directional light is certainly an option).
Godot does not keep the time for you. But you get the length of the current frame in the delta parameter of the _process function. You can sum up the value of delta over every frame which gives you the number of real seconds since the game started.
Usually time passes faster in game than in the real world. You need to decide on a factor that specifies how much faster. If you divide the summed up delta time by this factor you get the number of in-game seconds since the game started. Take that modulo the number of in-game seconds in an in-game day and you have the time of day.
How to map the time of day to sky colours is up to you again.

Tuning Parameters to Optimize Score without CNN

I am trying to create an Agent in Rust that uses a scoring function to determine the best move on a 2D uniform cost grid. The specifics of the game aren't very relevant, other than knowing that each turn you can choose to make one of 4 moves (up, down, left or right) and you are competing against other AIs who are playing on the same board. Currently the AI makes "branches" of possible paths it could make into the future using several different simple algorithms such as using A* to find enemies or food. Several characteristics are saved as the future simulations run including the number of enemies we killed on that branch, amount of food we ate and how long the future branch lasted before we died.
Once we are ready to make our move, we give each future predicting branch a score and go in the direction with the highest average score. This score is essentially a sum of each characteristic mentioned previously multiplied by a constant. For example the score may be 30 * number of food eaten + 100 * number of enemies killed. However, the number 30 and 100 were chosen almost at random through experimentation. If the snake died from not eating food then I increase the score multiplier for eating food for example. However, there are 10 different characteristics each with their own weight. Figuring out the relationship between them all manually is both time consuming and doesn't easily converge onto the optimal strategy.
Here in lies my issue. I would like to find a way to "train" the values for the AI through a process sort of like Q-Learning. There is a very clear terminal condition when you win or lose which helps. My currently idea is creating a table with 100 possible values of each parameter, then play 100 games with each combination and record the win rate. However, this would take (1000 choose 10) * 100 games or 2.6E25 games. It seems like there should be a smarted way to eliminate bad combinations using some form of loss minimization. If anybody has suggestions on tuning these parameters without a neural network, it would be greatly appreciated.

Primary School Project - Timing gate

I'd like to apologise in advance if this has been asked before, but I have searched repeatedly and haven't found anything that helps. I'd also like to point out that I am a complete beginner to code, please forgive me if this turns out to be simple or a silly question.
I am trying to build a simple timing gate that I can teach to a group of year 6 pupils (age 10/11). We are using python 3 and a raspberry pi to create the gates. The timing gate will need to display the time it takes a CO2 powered car to travel between two points. This one of our first projects.
Their idea is that it will consist of 2 motion sensors set a known distance apart.
When the first sensor is triggered - start time
When the second sensor is triggered - end time
print (end - start)
from gpiozero import MotionSensor
import time
from time import sleep
pir = MotionSensor(19)
pir2 = MotionSensor(4)
while True:
if pir.motion_detected:
start = time.time()
if pir2.motion_detected:
end = time.time()
print(end - start)
The motion sensors detect the movement and print numbers to the screen, but they are long strings of numbers that we can't interpret.
We would like to ask:
Is there a simple way of getting the time to display in seconds (to 3dp)?
The function time.time() returns you a unix-timestamp, that is the number of seconds passed since 01.01.1970, as a floating point number. Being a number in the order of 1.5 billion it doesn't give you much insight per se, but if you use it to compute time differences, it works perfectly fine. I experienced the accuracy to be dependent on the system I used (Windows vs Ubuntu), but it was never worse than the millisecond accuracy that you require.

Resources