First off, obligatory great job to the creators and collaborators.
Watching how the Mining bot works, couldn’t help but wonder how detectable it can be, due to the repeatability of its actions and especially its consistent “cycle time” (botStepDelayMilliseconds). Is there a way to make said cycle time random within a range? Something between 2000 and 3500 ?
Viir
(Michael Rätzel)
May 10, 2020, 6:03pm
2
Thank you for the feedback!
Sure, we can increase the variance in the step time with a deliberate random component. I see we already have a function to get entropy for such purposes: bots/BotFramework.elm at c6e6d9bede013a680b390d7ff2e235d8007d2c57 · Viir/bots · GitHub
Looks like you could integrate it here:
(\decisionLevel -> (++) (("+" |> List.repeat (decisionLevel + 1) |> String.join "") ++ " "))
|> String.join "\n"
statusMessage =
[ describeStateForMonitoring parsedUserInterface botMemory, describeActivity ]
|> String.join "\n"
in
( { stateBefore | botMemory = botMemory, programState = programState }
, EveOnline.BotFramework.ContinueSession
{ effects = effectsRequests
, millisecondsToNextReadingFromGame = botSettings.botStepDelayMilliseconds
, statusDescriptionText = statusMessage
}
)
describeStateForMonitoring : ParsedUserInterface -> BotMemory -> String
describeStateForMonitoring parsedUserInterface botMemory =
let
describeSessionPerformance =
[ ( "times unloaded", botMemory.timesUnloaded )
How about this?
millisecondsToNextReadingFromGame = botSettings.botStepDelayMilliseconds + ((getEntropyIntFromUserInterface parsedUserInterface) |> modBy 1500)
This seems to be doing exactly was what suggested! Thank you for your fast reply!
Is there a module that can simulate pressing keys? That can simplify some things & add even more functions!
Viir
(Michael Rätzel)
May 12, 2020, 4:46pm
4
Yes, you can make the bot press keyboard keys. There are separate effects for KeyDown
and KeyUp
. I found this example in a ratting bot: This bot presses the W
key:
( "Click on the overview entry and press the 'W' key."
, [ overviewEntryToOrbit.uiNode |> clickOnUIElement MouseButtonLeft
, VolatileHostInterface.KeyDown keyCodeLetterW
, VolatileHostInterface.KeyUp keyCodeLetterW
]
)
Thanks, I will play with this one and share any interesting functions
Viir
(Michael Rätzel)
January 19, 2021, 5:24pm
6
Small update with an adaption to more recent frameworks:
processEvent : InterfaceToHost.AppEvent -> State -> ( State, InterfaceToHost.AppResponse )
processEvent =
EveOnline.AppFrameworkSeparatingMemory.processEvent
{ parseAppSettings = parseBotSettings
, selectGameClientInstance =
Maybe.andThen .selectInstancePilotName
>> Maybe.map EveOnline.AppFramework.selectGameClientInstanceWithPilotName
>> Maybe.withDefault EveOnline.AppFramework.selectGameClientInstanceWithTopmostWindow
, updateMemoryForNewReadingFromGame = updateMemoryForNewReadingFromGame
, statusTextFromDecisionContext = statusTextFromDecisionContext
, decideNextStep =
\context ->
context
|> miningBotDecisionRoot
|> EveOnline.AppFrameworkSeparatingMemory.setMillisecondsToNextReadingFromGameBase
(context.eventContext.appSettings.botStepDelayMilliseconds
+ (EveOnline.AppFramework.getEntropyIntFromReadingFromGameClient context.readingFromGameClient |> modBy 1500)
)
}