Player12
An open source football management simulator
Loading...
Searching...
No Matches
ManagerMarketModel Namespace Reference

Functions

ReputationTier reputationTier (float reputation)
 
const char * reputationTierKey (ReputationTier tier)
 
const char * licenceKey (CoachingLicence licence)
 
const char * styleKey (ManagerStyle style)
 
const char * backgroundKey (ManagerBackground background)
 
const char * ownerKey (OwnerType owner)
 
const char * departureKey (DepartureReason reason)
 
const char * awardKey (ManagerAwardKind kind)
 
float startingReputation (ManagerBackground background)
 
CoachingLicence startingLicence (ManagerBackground background)
 
CoachingLicence requiredLicence (std::uint8_t club_reputation, std::uint8_t tier)
 
float applicationChance (float manager_reputation, CoachingLicence licence, std::uint8_t club_reputation, std::uint8_t tier, float fit)
 
std::int64_t offerWage (std::uint8_t club_reputation, float manager_reputation, std::uint8_t tier)
 
float updateConfidence (float confidence, float &form, float points, float expected_points)
 
float weeklyDismissalHazard (float confidence, std::uint16_t matches, OwnerType owner)
 
float seasonEndDismissalChance (int position, int expected_position, int league_size, float confidence, OwnerType owner)
 
float monthFactor (std::uint8_t month)
 
ClubVision clubVision (std::uint64_t world_seed, TeamID team_id, std::uint8_t reputation, std::uint8_t youth_facilities, std::int64_t balance, std::int64_t yearly_income)
 
const char * interviewQuestionKey (InterviewTopic topic)
 
const char * interviewOptionKey (InterviewTopic topic, std::size_t option)
 
int interviewAnswerFit (const ClubVision &vision, InterviewTopic topic, std::size_t option)
 

Variables

constexpr std::size_t MAX_CONTRACT_YEARS = 4
 

Detailed Description

Pure rules of the manager market, shared by the career and its tests. [P] marks tunable estimates; see test_manager_career.cpp for the calibration (top-flight manager changes per season, dismissed tenure).

Function Documentation

◆ applicationChance()

float ManagerMarketModel::applicationChance ( float  manager_reputation,
CoachingLicence  licence,
std::uint8_t  club_reputation,
std::uint8_t  tier,
float  fit = 0.0f 
)

Probability that a board invites the manager to an interview: logistic in manager reputation minus club reputation, minus a penalty per missing licence level, plus fit (style and nationality match with the board, in logistic units); clamped to [0.02, 0.95].

◆ awardKey()

const char * ManagerMarketModel::awardKey ( ManagerAwardKind  kind)

◆ backgroundKey()

const char * ManagerMarketModel::backgroundKey ( ManagerBackground  background)

◆ clubVision()

ClubVision ManagerMarketModel::clubVision ( std::uint64_t  world_seed,
TeamID  team_id,
std::uint8_t  reputation,
std::uint8_t  youth_facilities,
std::int64_t  balance,
std::int64_t  yearly_income 
)

Deterministic board profile of a club.

◆ departureKey()

const char * ManagerMarketModel::departureKey ( DepartureReason  reason)

◆ interviewAnswerFit()

int ManagerMarketModel::interviewAnswerFit ( const ClubVision &  vision,
InterviewTopic  topic,
std::size_t  option 
)

Fit of one answer with the board's vision, -1..2.

◆ interviewOptionKey()

const char * ManagerMarketModel::interviewOptionKey ( InterviewTopic  topic,
std::size_t  option 
)

◆ interviewQuestionKey()

const char * ManagerMarketModel::interviewQuestionKey ( InterviewTopic  topic)

Key of a topic's question and of one of its options.

◆ licenceKey()

const char * ManagerMarketModel::licenceKey ( CoachingLicence  licence)

◆ monthFactor()

float ManagerMarketModel::monthFactor ( std::uint8_t  month)

Sacking season: weight of the in-season hazard by month (0 = none).

◆ offerWage()

std::int64_t ManagerMarketModel::offerWage ( std::uint8_t  club_reputation,
float  manager_reputation,
std::uint8_t  tier 
)

Weekly wage a club offers (whole euros).

◆ ownerKey()

const char * ManagerMarketModel::ownerKey ( OwnerType  owner)

◆ reputationTier()

ReputationTier ManagerMarketModel::reputationTier ( float  reputation)

◆ reputationTierKey()

const char * ManagerMarketModel::reputationTierKey ( ReputationTier  tier)

◆ requiredLicence()

CoachingLicence ManagerMarketModel::requiredLicence ( std::uint8_t  club_reputation,
std::uint8_t  tier 
)

Licence a board expects for a club of this stature and division.

◆ seasonEndDismissalChance()

float ManagerMarketModel::seasonEndDismissalChance ( int  position,
int  expected_position,
int  league_size,
float  confidence,
OwnerType  owner 
)

Probability of a season-end dismissal after finishing position.

◆ startingLicence()

CoachingLicence ManagerMarketModel::startingLicence ( ManagerBackground  background)

◆ startingReputation()

float ManagerMarketModel::startingReputation ( ManagerBackground  background)

Starting reputation, licence and age range of a background.

◆ styleKey()

const char * ManagerMarketModel::styleKey ( ManagerStyle  style)

◆ updateConfidence()

float ManagerMarketModel::updateConfidence ( float  confidence,
float &  form,
float  points,
float  expected_points 
)

Board confidence after a league match: an exponentially smoothed points-minus-expected form feeds B = 0.9 B + 0.1 (50 + 25 z).

◆ weeklyDismissalHazard()

float ManagerMarketModel::weeklyDismissalHazard ( float  confidence,
std::uint16_t  matches,
OwnerType  owner 
)

Weekly dismissal hazard h0 * exp(-beta (B - 50) / 25) during the season, damped over the first ten matches and scaled by owner patience. There is no bounce term: a new manager starts from neutral confidence only.

Variable Documentation

◆ MAX_CONTRACT_YEARS

constexpr std::size_t ManagerMarketModel::MAX_CONTRACT_YEARS = 4
inlineconstexpr