
Cobblemon:Crzbrain
CRZbrain is a Kotlin-based Fabric mod for Minecraft/Cobblemon that gives Pokemon an AI-powered brain featuring reinforcement learning, sentiment analysis, cross-trainer knowledge sharing, and adaptive response generation to make Pokemon interaction
Tags
Creators
Details
2.1.0
Compatibility
Changes
● v3.8 Changelog
- Commands.kt Full Bilingual (~112 strings)
- All 22 command handler functions now support English via Lang.t()
- Labels: Species, Level, Friendship, Weather, Ability, Types, Status
- Relationship types: BEST FRIENDS, FRIENDS, ACQUAINTANCES, NEUTRAL, DISLIKE, RIVALS
- Time of day: Morning, Day, Sunset, Night, Dawn
- Weather: Storm, Rain, Clear
- All help text, error messages, admin commands, friendship bonuses, battle sync, world context
- RL Action Key Fix (CRITICAL BUG)
- trackAction() was storing literal string "response" as action key since v2.4
- All policies had only 1 action entry → RL scoring in SRG used part.take(40).lowercase() as lookup key → never matched "response" → getActionSuccessProbability() always returned default 0.5f
- The entire RL scoring boost was non-functional since inception
- Fix: now stores finalResponse.take(40).lowercase() as action key, matching what scoring looks up
- RL-Driven Response Generation (NEW)
- New generation path using chooseBestAction() to produce response parts from learned policies
- Guards: 30+ episodes (no cold start), action 5-150 chars, not old "response" key, success probability > 60%, budget-gated at 15%
- Tracked as "rl_response" feature source for feedback loop
- Context Quality Threshold Lowered
- SRG threshold: 0.5f → 0.35f (0.5 was blocking learning context for new/young Pokemon)
- LCI: added enhancementScale — at quality 0.35 → 30% enhancement strength, at 0.5+ → 100%
- New Pokemon now benefit from learning data much earlier
- LanguageGrowth Catchphrase Getter
- Added public getCatchphrase(pokemonId): String? method
- Catchphrases were already used internally in enrichResponse() at 5% chance, but now accessible externally
- ExternalAI Diversity Penalty Fix
- Old: sqrt(excess) * 0.03 subtracted — response used 100 times still had ~70% quality
- New: ln(1 + excess) * 0.06 multiplicative — 10 excess: ×0.86, 50: ×0.76, 100: ×0.72, 500: ×0.63
- Floor at 5% prevents total data loss
- TPS Optimizations
- Cache TTL: CACHE_TTL_TICKS 10 → 40 (0.5s → 2s) — event-based invalidation handles fast updates, TTL is just a fallback
- GlobalKN flatMap: flatMap { listOf() + list }.toSet() → mutableSetOf() + forEach { addAll } — eliminates intermediate List allocation
- GlobalKN eviction: sorts lightweight Pair<String, Float> instead of full Map.Entry objects
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:JbNzzoj3:DF3I3kaV"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:JbNzzoj3:DF3I3kaV"
}
