JaffarPlus
High-performance best-first search optimizer for tool-assisted speedruns
Loading...
Searching...
No Matches
engine.hpp File Reference

Parallel breadth-first search engine that expands game states step by step, deduplicating via a hash database and storing survivors in a state database while tracking win states, checkpoints, and per-operation timing statistics. More...

#include "game.hpp"
#include "hashDb.hpp"
#include "numa.hpp"
#include "runner.hpp"
#include "stateDb.hpp"
#include <algorithm>
#include <emulatorList.hpp>
#include <gameList.hpp>
#include <jaffarCommon/deserializers/base.hpp>
#include <jaffarCommon/hash.hpp>
#include <jaffarCommon/json.hpp>
#include <jaffarCommon/logger.hpp>
#include <jaffarCommon/parallel.hpp>
#include <jaffarCommon/serializers/base.hpp>
#include <jaffarCommon/timing.hpp>

Go to the source code of this file.

Classes

class  jaffarPlus::Engine
 Parallel state-space search engine. More...
 
struct  jaffarPlus::Engine::stateInfo_t
 A reward value paired with a serialized state buffer. More...
 
struct  jaffarPlus::Engine::manualSaveSolution_t
 A manually saved solution: its input path, reward, serialized state, and triggering rule index. More...
 
struct  jaffarPlus::Engine::threadAccumulator_t
 Per-thread accumulator for timing and counters. More...
 

Macros

#define JAFFAR_PROF_DECL(var)   const auto var = jaffarCommon::timing::now()
 Declares a timestamp variable var holding the current time (detailed-profiling build).
 
#define JAFFAR_PROF_ACC(field, var)   field += jaffarCommon::timing::timeDeltaMicroseconds(jaffarCommon::timing::now(), var)
 Accumulates the microseconds elapsed since timestamp var into field.
 

Detailed Description

Parallel breadth-first search engine that expands game states step by step, deduplicating via a hash database and storing survivors in a state database while tracking win states, checkpoints, and per-operation timing statistics.

Definition in file engine.hpp.

Macro Definition Documentation

◆ JAFFAR_PROF_ACC

#define JAFFAR_PROF_ACC (   field,
  var 
)    field += jaffarCommon::timing::timeDeltaMicroseconds(jaffarCommon::timing::now(), var)

Accumulates the microseconds elapsed since timestamp var into field.

Definition at line 37 of file engine.hpp.

◆ JAFFAR_PROF_DECL

#define JAFFAR_PROF_DECL (   var)    const auto var = jaffarCommon::timing::now()

Declares a timestamp variable var holding the current time (detailed-profiling build).

Definition at line 35 of file engine.hpp.