feat(BNNBot): add virtual hit percentage to output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
@@ -133,10 +133,13 @@ method onScannedBot*(bot: BNNBot, e: ScannedBotEvent) =
|
|||||||
let hamming = if bot.hasPrev: hammingDistance(bot.prevVec, vec) else: 0
|
let hamming = if bot.hasPrev: hammingDistance(bot.prevVec, vec) else: 0
|
||||||
let similarity = if bot.hasPrev: TOTAL_BITS - hamming else: 0
|
let similarity = if bot.hasPrev: TOTAL_BITS - hamming else: 0
|
||||||
let overlap = if bot.hasPrev: popcount(bitwiseAnd(bot.prevVec, vec)) else: 0
|
let overlap = if bot.hasPrev: popcount(bitwiseAnd(bot.prevVec, vec)) else: 0
|
||||||
|
let totalVirtual = bot.virtualHits + bot.virtualMiss
|
||||||
|
let hitPct = if totalVirtual > 0: bot.virtualHits.float / totalVirtual.float * 100.0 else: 0.0
|
||||||
echo align($bot.tick, 4), " ", formatBinary(vec), " ",
|
echo align($bot.tick, 4), " ", formatBinary(vec), " ",
|
||||||
hamming, " ", similarity, " ", overlap, " ",
|
hamming, " ", similarity, " ", overlap, " ",
|
||||||
formatFloat(aimOffset, ffDecimal, 2), " ",
|
formatFloat(aimOffset, ffDecimal, 2), " ",
|
||||||
bot.virtualHits, " ", bot.virtualMiss
|
bot.virtualHits, " ", bot.virtualMiss, " ",
|
||||||
|
formatFloat(hitPct, ffDecimal, 1), "%"
|
||||||
|
|
||||||
bot.prevVec = vec
|
bot.prevVec = vec
|
||||||
bot.hasPrev = true
|
bot.hasPrev = true
|
||||||
|
|||||||
Reference in New Issue
Block a user