![]() ![]() ![]() It would actually be surprising if this happened exactly: it’s called random for a reason, and with the small amount of points I have in each bin (around 60), it’s likely that the proportions I observed are not perfectly in line with expectation. In an ideal world, with infinite data, the red line on the graph would pass through the tops of all the bars. I’ve grouped these into 5% bins, and then plotted a bar for each bin, showing how many of those shots actually hit. ![]() On the X axis is the stated chance to hit: the number that popped up in the box when I took the shot. The Fairnessīelow is the best graph I could think of to represent the fairness of the random number generator. You really do notice only the negative streaks, and never the positive streaks. I ended up losing two of the four men, and since it was the first mission, I restarted in disgust. ![]() On the other hand, here’s a (much more likely) streak from the third game I started, from the first mission, where I missed my first six shots with percentages: So even when I had amazing positive luck with my shots, I didn’t even notice until I took stock of the spreadsheet after the mission. I downed 20 enemies in all, and lost 3 of my 6 men because I got so overwhelmed. In the first streak, all the aliens appeared on one turn, and I couldn’t kill the Chrysalids faster than they were turning the civilians into zombies. Both of the above streaks came in “very difficult” terror missions. I wasn’t sitting there shouting “amazing!” as hit after hit piled on. What’s interesting is how I felt while playing the missions. The longest streaks of hits that I noticed in the data was one streak with an incredible 18 hits in a row, and another with 19 hits in a row, with the following percentage chances to hit: Keeping this record of hits and misses in XCOM taught me a lot about the psychology of playing the game. (I ignored overwatch shots because I couldn’t see their probabilities, and also didn’t bother with rockets and other later-game non-gun weapons etc.) I’ve recorded over 1200 shots, and in this post I’ll examine the data to see if XCOM is fair. For every shot I actively took, I recorded the displayed chance of it hitting, and whether it actually hit or missed. Because I’m completely hooked on the game For science, I’ve been playing a lot of XCOM, and I have been recording my shots as I played. Many people claim - either seriously, or in jest because they are so frustrated with their luck - that it is broken. #Greenfoot random number code'pipe' and 'image' are variables that are not defined in the code and it is unclear if the image is of the upper pipe, the lower pipe, or both combined.A huge amount of discussion about the game XCOM: Enemy Unknown pertains to the random number generation. Also, if you look at the GreenfootImage class documentation, you will find you cannot put any parameters in the 'getHeight' method.Īs I do not know what your actual intention was with the line you gave above and cannot discern what the '-20' and '-60' represent, I probably cannot make the correction you need without more background information and code. If you look at the Greenfoot class documentation and check out the 'getRandomNumber' method, you will find that only one int value is allowed in its parameter list. The 'import greenfoot.* ' statement on the first line brings the class into the scope of the project (makes the class available to use members of). This is done by preceding the method name with the class name followed by a dot. It is a member of the Greenfoot class and you must inform the compiler that you are using a method from that class. Nor is it a member of any other class you are likely to be coding in. The 'getRandomNumber' method is not a member of the World class. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |