Bobrocket Posted June 6, 2015 Share Posted June 6, 2015 (edited) Focus can play a very important factor in your script; it could be the difference between a ban or not. As a result, I have found a way to simulate the idea of focus. Take this graph as an example: This graph shows the distributions of 3 response profiles: focused (in red), playing normally (in orange), and unfocused (in blue) Please note that this graph is not based on any statistical evidence. If you are focused (for example you're being PK'd), you are more likely to click faster and respond faster. If you are playing the game normally, you will click at an average-ish time. If you aren't focused (for example watching TV), you are more likely to click slower. This graph shows that the graph for being focused is a positive distribution. This means that the majority of the data will be clustered towards the negative end (closer to 0) than the positive end. It also shows that not being focused has a negative distribution, which means that the majority of the data is clustered towards the positive end (closer to 100 or wherever the graph ends) than 0. Playing normally has a normal distribution, which means that the data clusters around the midpoint of the data (in this scenario it would likely be symmetrical too, meaning that mean = mode = median) Below is some code that I found on Stackoverflow and slightly modified it. public int positiveSkewedRandom(int min, int max) { return skewedRandom((double) min, (double) max, 2.55, -1.68); } public int negativeSkewedRandom(int min, int max) { return skewedRandom((double) min, (double) max, 2.55, 1.68); } public int skewedRandom(double min, double max, double skew, double bias) { Random r = new Random(System.currentTimeMillis()); double range = max - min; double mid = min + range / 2.0; double unitGaussian = r.nextGaussian(); double biasFactor = Math.exp(bias); double retval = mid + (range * (biasFactor / (biasFactor + Math.exp(-unitGaussian / skew)) - 0.5)); return (int) retval; } The params for skewedRandom: min - the minimum possible value max - the maximum possible value skew - how close the data would be clustered together (higher = tighter clustering) bias - the tendency for the mode to approach the min/max/midpoint of the data; negative = positive bias, positive = negative bias Usage: boolean focused = true; if (focused) { sleep(positiveSkewedRandom(100, 750)); } else { sleep(negativeSkewedRandom(100, 750)); } If the data is not skewed enough, you can change the skew and bias settings in the respective method. Good luck, and happy botting! Edited June 6, 2015 by Bobrocket 3 Quote Link to comment Share on other sites More sharing options...
Appelflapjes Posted June 6, 2015 Share Posted June 6, 2015 Very interesting... Thanks for the great read! Quote Link to comment Share on other sites More sharing options...
fixthissite Posted June 6, 2015 Share Posted June 6, 2015 Nice to see an eager mind at work on preventing bans Although focus might play a factor between distinguishing humans from bots, I don't think it's something they'd try to account for, seeing how diverse people can be in that aspect. I stay calm when I used to PK; tensing up would make me choke. The focus one might have can go from totally afk to spam clicking everything, and the times they'd have more focus differ. Bots don't wanna afk, and you'd have to find the "right moments" to get up to spam clicking levels. If not implemented right, I feel it would make bots more distinguishable from humans, and implementing it well would require time that can be used for something that may be more beneficial. This is just my opinion though. Thanks for putting the time into this! Sounds really neat, but needs more meat on it. Do developers have to implement their own focus system? Do bot users adjust the focus settings to make it unique to each bot, and not just each script? How could we prevent a botter from adjusting the settings to something which would make them easier to spot? Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted June 6, 2015 Author Share Posted June 6, 2015 Nice to see an eager mind at work on preventing bans Although focus might play a factor between distinguishing humans from bots, I don't think it's something they'd try to account for, seeing how diverse people can be in that aspect. I stay calm when I used to PK; tensing up would make me choke. The focus one might have can go from totally afk to spam clicking everything, and the times they'd have more focus differ. Bots don't wanna afk, and you'd have to find the "right moments" to get up to spam clicking levels. If not implemented right, I feel it would make bots more distinguishable from humans, and implementing it well would require time that can be used for something that may be more beneficial. This is just my opinion though. Thanks for putting the time into this! Sounds really neat, but needs more meat on it. Do developers have to implement their own focus system? Do bot users adjust the focus settings to make it unique to each bot, and not just each script? How could we prevent a botter from adjusting the settings to something which would make them easier to spot? What I do in my scripts is set a timer of a random value between 18 and 45 minutes (thinking about TV and stuff here), and I change a variable for normal and unfocused (my scripts wouldn't exactly have consequences where spam clicking is required). I also have a method that wraps random number functions for negative skew and a normal distribution (see below) public int normalDistributionRandom(int min, int max) { int n; int mean = (min + max) / 2; int std = (max - mean) / 3; Random r = new Random(); do { double val = r.nextGaussian() * std + mean; n = (int) Math.round(val); } while (n < min || n > max); return n; } This means that people remain unfocused for 18-45 minutes and then resumes normally. If you think about it, focus could very well be seen as bannable. You aren't going to have the same distribution for 24 hours, are you? It shouldn't be too hard to implement, just change any sleep values you use to incorporate the focus of the bot. Quote Link to comment Share on other sites More sharing options...
fixthissite Posted June 6, 2015 Share Posted June 6, 2015 But this is suggesting focus is as simple as flicking a switch at random intervals. If Jagex were detecting such patterns in clicking (whether a user is focused or not), I really don't think they'd be checking only a player's focus level (kinda like you said, high and low), but also what they could be focusing on depending on at what moment during the activity. Like you said, you gotta account for irl activities such as watching tv, but I'm sure the amount of activities (and the attention required from those activities) can differ between countries, making it difficult to create a "silver bullet" system for focusing WITHOUT letting the individual botter (not scripter) adjust the settings how they feel it should be, ensuring focusing is unique on every bot. I'm not downing the idea at all; I actually really like the idea of changed tempo of clicks. It just seems unfinished, as if a few things were overlooked. If Jagex was checking how focused a player is as a bot scouting technique, I'm sure it would be a lot more elaborate than simply seeing if there's any periodical changes in click tempo. What I'm saying is if you really feel this is something that they'd check for, go all in with it; think of every possibility. Otherwise, it could be a cause of getting caught faster. If a bot is going at a somewhat constant pace (not 100% constant, but somewhat steady pace), there's not much evidence behind it being a bot; it could be a guy fueled up on red bull. But this is adding the possibility of a pattern (albiet one that may be hard to replicate depending on the implementation), and that's why I'm saying if it's not done correctly, it could actually cause bots to be more detectable. Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted June 6, 2015 Share Posted June 6, 2015 "Focus can play a very important factor in your script; it could be the difference between a ban or not."Is this an assumption or have you actually put this to the test? Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted June 7, 2015 Author Share Posted June 7, 2015 "Focus can play a very important factor in your script; it could be the difference between a ban or not." Is this an assumption or have you actually put this to the test? It's an assumption (hence the word could) which I am testing. In theory, it would work just like any other antipattern. But this is suggesting focus is as simple as flicking a switch at random intervals. If Jagex were detecting such patterns in clicking (whether a user is focused or not), I really don't think they'd be checking only a player's focus level (kinda like you said, high and low), but also what they could be focusing on depending on at what moment during the activity. Like you said, you gotta account for irl activities such as watching tv, but I'm sure the amount of activities (and the attention required from those activities) can differ between countries, making it difficult to create a "silver bullet" system for focusing WITHOUT letting the individual botter (not scripter) adjust the settings how they feel it should be, ensuring focusing is unique on every bot. I'm not downing the idea at all; I actually really like the idea of changed tempo of clicks. It just seems unfinished, as if a few things were overlooked. If Jagex was checking how focused a player is as a bot scouting technique, I'm sure it would be a lot more elaborate than simply seeing if there's any periodical changes in click tempo. What I'm saying is if you really feel this is something that they'd check for, go all in with it; think of every possibility. Otherwise, it could be a cause of getting caught faster. If a bot is going at a somewhat constant pace (not 100% constant, but somewhat steady pace), there's not much evidence behind it being a bot; it could be a guy fueled up on red bull. But this is adding the possibility of a pattern (albiet one that may be hard to replicate depending on the implementation), and that's why I'm saying if it's not done correctly, it could actually cause bots to be more detectable. Jagex probably doesn't directly check if a player is focused, but moreso if the player is constantly reacting within a certain time frame. Having focus would break the patterns and probably help those who suicide bot. This is unfinished because people write scripts differently to how I do. Personally, I use sleep between most interactions to simulate human responses, so I have modified my sleeps to use a focus level (see above). Others could use this as a factor in eating health or the time to drink a potion or whatever. Quote Link to comment Share on other sites More sharing options...