What I don't understand is how would you determine the next difficulty so that you know whether or not you create an anomaly. And more important how could you influence the difficulty? It's still completely random when someone will solve a block, so therefore it would be completely random what the next difficulty would be. You can calculate an estimate of this but theoretically it could take forever. Could you help me, what don't I understand?
You don't need to determine the next difficulty, Anomalies are based on the _current_ difficulty, which is evident when you read the source code.
You can influence difficulty by abusing KGW. If you look into how KGW works, it's entirely based on nTime - block discovery time as a unix timestamp. Thing is, nTime is very flexible - you can specify at least + or - 100 seconds and it will be accepted by the network. There is nothing random about nTime - it's chosen by the miner... and nTime is "when" someone solved the block
Yeah but you can't choose when to complete a block can you? In my understanding, (I'm only looking into these things since today so forgive me if i'm being stupid) you could indeed vary nTime but therefore you would have to have solved the hash already, then send it in when the difficulty would change so that the next block would create an anomaly. To do so you would need immense hash power to beat not only everyone who tries to solve the block, but also beat the exact time you need for the next block to be an anomaly too.