
Berwick - two players finished last game on -2 and -3 but now on 8 and 9.


Strange but true
AI's Euan Henderson finished against HIB on EL 1 and is now EL 9
David Fernadez finished on EL 1 and is EL now 9


Firstly, I don't have a problem with the random number generator, even though I do complain about lack of shots for us or too many for them. We did have a lot of goals in match 19 but we had a lot of high shot chance percentages as well. But a lot of managers think something should be done.
That doesn't mean any of the three Commissioners want it done Nor a lot of managers.
I did ask Claude and it gave four options. The worst was basically rolling twice and taking the average. Unfortunately this would move extremes towards 50% so we'd all get less chances. Claude recommended Weighted Random History. Basically you track how many chances you've had compared to expected. Falling behind and the chance goes up, ahead and the chance goes down.


Each session of matches a logfile is created. This has the shotchance and actual random numbers "rolled". In the 24 games there are 4320 rolls. However the code actually sometimes rolls twice, once for a shot and, if there isn't one, another for a near miss which has a 5% chance. Claude counted all these as well for 8317 and I think assumed that if the second roll was also a shot chance. Here's "his" comments:
Total draws 8317
Expected shots 569.3
Actual shots 602
Then there's something about standard deviatio a Z-score of 1.45/ "In statistical terms, this is not significant - you'd expect a result this far from the mean roughly 15% of ther time by pure chance.
Conclusion: There weremodestly more shots than expected but well within normal random variation. The random number generator appears to be behaving correctly - no evidence of bias.


Alon, away goals.
Matt, thank you but all I did was ask Al Sellers to check my code and he asked his AI friend, Claude, which improved it


I was looking at games - to see if there did seem to be something wrong with the random numbers* and saw a problem in the Viewer caused by Elgin's Josh O,Connor. The Viewer didn't like the comma so I've deleted it (the comma) from the database. I don't think it likes ' either but _ is OK if you want, Jason.
* to be honest I got bored but I did see a lot of high shot chances and also low SL GKs so I'm not surprised there were a lot of goals. There were a couple of anomolies: STJ getting 9 chances with a 4ish% chance and EF scoring 3 against an SL 36 GK in 54 minutes but it' just random numbers.
I'm going to ask Claude AI if the numbers seem to be random, maybe another day.


Please see if you can break the trade program. It works over on OASL but not tested with Safari.


I looked at the code for trades and worked out what goes wrong
First we have the proposed trade which is stored in the database as pending. It then shows up on both teams' pages then..
When one of the managers clicks on Confirm, Reject or Cancel it is passed on to another program which..
For now ignores Reject and Cancel but does the Confirmed trade if valid (player not already sold, not enough cash etc will invlidatethe trade). Crucially, as Andy FG surmised, there is no check to see if the trade has already gone through because once it has the links disappear from the team pages Then..
Updates the trade log to one of the three above or Invalid.
Refresh, Back button, Safari means the Confirm/Reject button can be processed again.
I had a couple of ideas and settled on one that checked to see if the trade was still pending before doing it, then at the end, updating if it hadn't already been done (I used a different token).Another one was to have a 5th status of 5 (which Claude calls "processing") but it didn't work in my head. I asked Al to have a look and he sent it to Caude who used both ideas and has also added a check on double-clicking the Confirm button.
I will be updating and resting tonight, so can I have some.proposed CP for TP trades please. I will propose similar for David and Matt to.see if they can break it. However the code might not work- the Blog one didn't at first as one line was not php 5 6 compatible.


Isn't the problem that if it was it wouldn't get light in Scotland until late in the morning in winter?
