Skip to content

tamvt-dev/InferCraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft World Inference Engine

Overview

Minecraft World Inference Engine is a research-oriented system for analyzing Minecraft worlds through probabilistic inference, not packet exploits or illegal client behavior.

Instead of "reading the answer directly", the engine tries to infer:

  • seed candidates, when feasible
  • likely base locations
  • important structures

using only chunk data that a legitimate client can already observe.

Core Idea

If a human can infer a base from patterns, the process can be modeled as a search + scoring problem.

The project treats world analysis as an inference pipeline:

  • State: observed world data and extracted chunk features
  • Transition: new evidence added as the player moves and loads more chunks
  • Score: probability that a candidate chunk, path, structure, or seed is meaningful

Scoring Model

Score(x) = w1 * heuristic(x) + w2 * ML(x)

Where:

  • heuristic(x) captures interpretable signals such as entropy, block density, light level, and unnatural placement patterns
  • ML(x) is a lightweight classifier, such as logistic regression, that predicts whether a chunk is valid, active, or meaningful

System Architecture

[Minecraft Mod (Java)]
        |
        v
   [Chunk Data]
        |
        v
 [IPC / Local API]
        |
        v
 [Core Engine (C)]
        |
        v
[Scoring + Inference + DB]
        |
        v
[Result -> Mod Overlay]

Components

1. Minecraft Mod (Java)

Responsible for client-side observation and visualization:

  • scans already-loaded chunks
  • extracts lightweight features from visible world state
  • forwards structured signals to the core engine
  • renders overlays such as heatmaps and highlights

Example feature inputs:

  • block placement patterns
  • container presence such as chests or furnaces
  • light and activity signals
  • bedrock pattern information

2. Core Engine (C)

The core engine is the main inference layer, responsible for:

  • base detection
  • optional seed inference
  • structure prediction
  • probabilistic ranking and search
  • local state management and caching

Possible techniques:

  • scoring systems
  • beam search
  • candidate ranking
  • incremental evidence fusion

3. Local Database

The database stores compact signals, not raw world dumps.

Example schema:

  • chunk_x
  • chunk_z
  • activity_score
  • block_density
  • container_count
  • bedrock_thickness
  • confidence

Key Features

1. Base Detection

The system does not rely on direct remote chest scanning. Instead, it scores chunks using signals that often correlate with player activity.

Score(chunk) = sum(wi * featurei)

Candidate features:

  • player-placed blocks
  • torch or light density
  • container presence
  • unnatural local patterns

2. Trail Tracking

The engine can detect and follow traversal evidence such as:

  • roads
  • nether highways
  • portal activity

These trails can be used to rank nearby chunks as possible base targets.

3. Chunk Heatmap

Visual output may include:

  • high-probability base zones
  • medium-confidence activity areas
  • regions worth rescanning after new evidence arrives

4. Structure Prediction

Once enough observations accumulate, the engine can attempt to predict likely locations of:

  • strongholds
  • fortresses
  • bastions

5. Seed Inference

Advanced mode:

  • input: partial world observations
  • output: top-K seed candidates

Possible methods:

  • probabilistic scoring
  • beam search
  • candidate pruning

Performance Strategy

The system is designed to stay lightweight on the client side:

  • only scans chunks that are already loaded
  • keeps feature extraction cheap
  • moves heavier computation into the C core
  • uses caching and state deduplication
  • updates the database incrementally

Non-Goals

This project explicitly does not aim to:

  • x-ray or read hidden containers remotely
  • exploit packets
  • bypass anti-cheat
  • brute-force the entire world blindly

The design goal is inference from legitimate observations, not unauthorized access.

Design Philosophy

The world is treated as a search-and-scoring problem rather than a direct extraction problem.

This leads to a hybrid approach:

  • interpretable heuristics for fast reasoning
  • lightweight ML for ranking and validation
  • incremental search as more evidence becomes available

Conceptually, it is closer to an inference engine than a cheat client.

Development Plan

Phase 1

  • build the CLI core engine in C
  • implement basic scoring
  • support first-pass base detection

Phase 2

  • build the Minecraft mod in Java
  • add chunk scanning
  • add overlay rendering

Phase 3

  • connect mod and core via IPC or local API
  • add local database and history tracking
  • support incremental session analysis

Phase 4

  • add ML-based scoring
  • add seed inference
  • add adaptive beam search

Final Goal

Build a system that can reason effectively about Minecraft worlds without hacks or exploits by turning world interpretation into an inference problem.

In short:

  • not hacking
  • not packet exploitation
  • not raw world dumping
  • yes to search, scoring, ranking, and probabilistic reasoning

Current Implementation

This repository now includes a working Phase 1 foundation:

  • a C CLI core engine
  • CSV-based chunk signal ingestion
  • stdin/live batch ingestion for external clients
  • heuristic scoring for base, trail, activity, and structure ranking
  • append-only local snapshot persistence
  • a Java bridge scaffold for future Minecraft client integration
  • a Fabric client mod skeleton that can trigger scans in-game
  • sample data for smoke testing

Current repository layout:

core/
  include/infercraft/
  src/
data/
java-bridge/
fabric-mod/
samples/
build.ps1

Input Schema

The Phase 1 CLI reads chunk observations from CSV.

Required columns:

dimension,chunk_x,chunk_z,player_placed_ratio,light_density,container_count,
unnatural_pattern_score,trail_score,bedrock_signal,activity_noise

Example:

overworld,14,-8,0.87,0.71,5,0.81,0.18,0.05,0.08
nether,2,40,0.22,0.36,0,0.48,0.90,0.62,0.09

CLI Usage

Build:

./build.ps1

If PowerShell blocks script execution on Windows:

powershell -ExecutionPolicy Bypass -File .\build.ps1

Analyze sample data:

./infercraft.exe --input samples/base_signals.csv --top 5

Analyze via stdin:

cmd /c "type samples\base_signals.csv | infercraft.exe --input - --no-persist"

Rank by another signal:

./infercraft.exe --input samples/base_signals.csv --rank-by trail --top 3

Disable persistence:

./infercraft.exe --input samples/base_signals.csv --no-persist

Available CLI options:

  • --input <path>: source CSV of chunk observations
  • --db <path>: append-only local snapshot file
  • --top <count>: number of top-ranked chunks to print
  • --rank-by <base|activity|trail|structure>: ranking mode
  • --no-persist: skip writing snapshot output

Build requirements:

  • clang, gcc, or cl available on PATH
  • build.ps1 also checks common msys64 compiler locations on Windows

Output

The CLI produces:

  • best base candidate
  • best trail candidate
  • best structure candidate
  • top-N ranked chunks for the selected metric
  • optional snapshot rows appended to data/chunk_signals.csv

Java Bridge

The java-bridge/ directory contains a plain Java transport layer for feeding chunk signals into the core engine over stdin.

This gives the project a clean integration seam:

  • Minecraft client or mod collects chunk features
  • Java bridge serializes them to the core CSV schema
  • the C engine ranks candidates and returns text output

Because the current machine has a Java runtime but no javac on PATH, the bridge source was scaffolded but not compiled here.

Fabric Mod Skeleton

The fabric-mod/ directory contains a separate Fabric client project that reuses the Java bridge source and is designed to call infercraft.exe from inside Minecraft.

Current skeleton features:

  • Fabric client entrypoint
  • I keybind for manual scans
  • lightweight HUD status overlay
  • simple local config bootstrap
  • chunk signal collection around the player
  • process bridge into the C core

Runtime flow:

  1. build infercraft.exe in the repository root
  2. launch the Fabric client project
  3. press I in-game
  4. inspect the returned best-candidate summary in the HUD

Environment note:

  • the Fabric project targets Java 17
  • this workspace currently does not have Gradle or a Java 17 JDK, so the Fabric scaffold was created but not compiled here

Notes

Phase 1 intentionally uses a simple CSV snapshot store instead of SQLite so the project can stay portable and dependency-light while the inference model is still evolving.

The next natural step is to add:

  • richer feature extraction
  • chunk clustering across nearby coordinates
  • IPC between the C engine and a Java mod
  • stronger structure and seed inference pipelines

About

Don’t scan. Infer. InferCraft turns Minecraft world data into signals—and signals into truth.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors