Player12
An open source football management simulator
Loading...
Searching...
No Matches
scouting.h File Reference
#include <array>
#include <cstdint>
#include <functional>
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include "global/types.h"
#include "model/gamedate.h"
#include "model/scout_expertise.h"

Go to the source code of this file.

Classes

struct  ScoutProfile
 A scout of the managed club (1-100 abilities). More...
 
struct  ScoutAssignment
 A scout's trip; the cost is paid when it starts. More...
 
struct  ScoutReport
 A dated snapshot of a scout's opinion; never updated afterwards. More...
 
struct  RecruitmentFocus
 A squad need scouts prioritise. Zero limits mean "no limit". More...
 
struct  ShortlistEntry
 A tracked player with the last status alerts were based on. More...
 
struct  ScoutKnowledge
 Accumulated knowledge of one player beyond the relation baseline. More...
 
struct  ScoutedAttribute
 Estimated attribute with its 80% range. More...
 
struct  ScoutedPlayerView
 Everything the UI may show about a player's ability. More...
 
struct  ScoutedPlayerRow
 Compact estimated row for searches and tables. More...
 
struct  ScoutSearchFilter
 Player search on estimated values. Zero limits mean "no limit". More...
 
struct  SquadComparisonRow
 One position: own depth versus the best shortlisted option. More...
 
struct  ScoutingState
 Persisted state of the managed club's scouting department. More...
 
struct  ScoutSummary
 One row of the scouts list. More...
 
class  ScoutingSystem
 Recruitment under uncertainty for the managed club. More...
 
struct  ScoutingSystem::Noise
 
struct  ScoutingSystem::Estimate
 

Namespaces

namespace  ScoutingTuning
 Calibration of the scouting model. [P] marks designer priors.
 

Enumerations

enum class  ScoutTargetKind : std::uint8_t {
  Player = 0 , League , Country , FreeAgents ,
  Region
}
 What an assignment covers (values are persisted). More...
 
enum class  ScoutAssignError : std::uint8_t {
  None , NoTeam , UnknownScout , ScoutBusy ,
  InvalidTarget , InvalidDuration , InsufficientFunds
}
 Why an assignment could not be started. More...
 
enum class  ScoutGrade : std::uint8_t { A = 0 , B , C }
 Recommendation grade of a report (values are persisted). More...
 
enum  ShortlistFlag : std::uint8_t { SHORTLIST_LISTED = 0x01 , SHORTLIST_EXPIRING = 0x02 , SHORTLIST_INJURED = 0x04 }
 Status bits of a shortlisted player (values are persisted). More...
 
enum class  ScoutStatus : std::uint8_t { OnAssignment , IdleWithHistory , IdleNew }
 What a scout is doing, which decides his page. More...
 

Functions

const char * scoutGradeKey (ScoutGrade grade)
 
const char * scoutTargetKindKey (ScoutTargetKind kind)
 
const char * scoutAssignErrorKey (ScoutAssignError error)
 

Variables

constexpr float ScoutingTuning::OWN_KNOWLEDGE = 100.0f
 
constexpr float ScoutingTuning::SAME_LEAGUE_KNOWLEDGE = 30.0f
 
constexpr float ScoutingTuning::SAME_COUNTRY_KNOWLEDGE = 18.0f
 
constexpr float ScoutingTuning::FREE_AGENT_KNOWLEDGE = 10.0f
 
constexpr float ScoutingTuning::FOREIGN_KNOWLEDGE = 5.0f
 
constexpr float ScoutingTuning::MAX_SCOUTED_KNOWLEDGE = 95.0f
 
constexpr float ScoutingTuning::DAILY_DECAY = 0.05f
 
constexpr float ScoutingTuning::MATCH_OBSERVATION_GAIN = 6.0f
 
constexpr float ScoutingTuning::PLAYER_ASSIGNMENT_DAILY_GAIN = 7.0f
 
constexpr float ScoutingTuning::COVERAGE_OBSERVATION_GAIN = 20.0f
 
constexpr int ScoutingTuning::COVERAGE_PLAYERS_PER_DAY = 5
 
constexpr float ScoutingTuning::REPORT_KNOWLEDGE = 40.0f
 
constexpr int ScoutingTuning::REPORT_COOLDOWN_DAYS = 60
 
constexpr int ScoutingTuning::MAX_REPORTS_PER_ASSIGNMENT_DAY = 2
 
constexpr float ScoutingTuning::ATTRIBUTE_SD_FLOOR = 0.8f
 
constexpr float ScoutingTuning::ATTRIBUTE_SD_UNSEEN = 11.0f
 
constexpr float ScoutingTuning::ATTRIBUTE_POPULATION_SD = 12.0f
 
constexpr float ScoutingTuning::POTENTIAL_POPULATION_SD = 9.0f
 
constexpr float ScoutingTuning::D_PRIME_SINGLE_SOURCE = 0.78f
 
constexpr float ScoutingTuning::D_PRIME_COACH_EYE = 1.29f
 
constexpr float ScoutingTuning::D_PRIME_COMBINED = 2.09f
 
constexpr float ScoutingTuning::RANGE_Z = 1.2816f
 
constexpr std::uint8_t ScoutingTuning::RANGE_DISPLAY_KNOWLEDGE = 50
 
constexpr std::int64_t ScoutingTuning::DAILY_COST_DOMESTIC = 900
 
constexpr std::int64_t ScoutingTuning::DAILY_COST_FOREIGN = 2'500
 
constexpr std::int64_t ScoutingTuning::DAILY_COST_FREE_AGENTS = 500
 
constexpr std::uint16_t ScoutingTuning::MIN_DURATION_DAYS = 3
 
constexpr std::uint16_t ScoutingTuning::MAX_DURATION_DAYS = 120
 
constexpr float ScoutingTuning::EXPECTED_WAGE_RAISE = 1.15f
 
constexpr float ScoutingTuning::UNLISTED_FEE_PREMIUM = 1.35f
 
constexpr float ScoutingTuning::EXPIRING_FEE_DISCOUNT = 0.6f
 
constexpr std::size_t ScoutingTuning::MAX_REPORTS = 300
 
constexpr std::size_t ScoutingTuning::MAX_FINISHED_ASSIGNMENTS = 40
 
constexpr std::size_t ScoutingTuning::MAX_FOCUSES = 6
 

Enumeration Type Documentation

◆ ScoutAssignError

enum class ScoutAssignError : std::uint8_t
strong

Why an assignment could not be started.

Enumerator
None 
NoTeam 
UnknownScout 
ScoutBusy 
InvalidTarget 
InvalidDuration 
InsufficientFunds 

◆ ScoutGrade

enum class ScoutGrade : std::uint8_t
strong

Recommendation grade of a report (values are persisted).

Enumerator
A 

Fits a need, affordable and available.

B 

Two of the three.

C 

At most one.

◆ ScoutStatus

enum class ScoutStatus : std::uint8_t
strong

What a scout is doing, which decides his page.

Enumerator
OnAssignment 

Live assignment and the reports filed so far.

IdleWithHistory 

Past assignments and their reports.

IdleNew 

Nothing yet: send him somewhere.

◆ ScoutTargetKind

enum class ScoutTargetKind : std::uint8_t
strong

What an assignment covers (values are persisted).

Enumerator
Player 

target_id: PlayerID.

League 

target_id: LeagueID.

Country 

target_id: top LeagueID; covers its divisions and cup.

FreeAgents 

target_id unused.

Region 

target_id: Continent; every country on it.

◆ ShortlistFlag

enum ShortlistFlag : std::uint8_t

Status bits of a shortlisted player (values are persisted).

Enumerator
SHORTLIST_LISTED 
SHORTLIST_EXPIRING 
SHORTLIST_INJURED 

Function Documentation

◆ scoutAssignErrorKey()

const char * scoutAssignErrorKey ( ScoutAssignError  error)

Language key of an assignment error ("SCOUT_ERROR_BUSY"...).

◆ scoutGradeKey()

const char * scoutGradeKey ( ScoutGrade  grade)

Language key of a grade ("SCOUT_GRADE_A"...).

◆ scoutTargetKindKey()

const char * scoutTargetKindKey ( ScoutTargetKind  kind)

Language key of a target kind ("SCOUT_TARGET_PLAYER"...).