pub struct MeanFieldGameSolver {
pub num_states: usize,
pub num_actions: usize,
pub transitions: Vec<Vec<Vec<f64>>>,
pub rewards: Vec<Vec<f64>>,
pub discount: f64,
pub tol: f64,
pub max_iter: usize,
}Expand description
Mean field game solver via fixed-point iteration.
Iterates:
- Given population distribution μ, solve individual optimal control → policy π.
- Given policy π, simulate population dynamics → new distribution μ’.
- Repeat until ||μ’ - μ|| < ε.
Fields§
§num_states: usizeNumber of states.
num_actions: usizeNumber of actions.
transitions: Vec<Vec<Vec<f64>>>Transition kernel (state-dependent on population): T[s][a][s’].
rewards: Vec<Vec<f64>>Reward (depends on state, action, mean population weight). reward[s][a] — simplified to not depend on μ for tractability.
discount: f64Discount factor.
tol: f64Convergence tolerance.
max_iter: usizeMaximum iterations.
Implementations§
Trait Implementations§
Source§impl Clone for MeanFieldGameSolver
impl Clone for MeanFieldGameSolver
Source§fn clone(&self) -> MeanFieldGameSolver
fn clone(&self) -> MeanFieldGameSolver
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MeanFieldGameSolver
impl RefUnwindSafe for MeanFieldGameSolver
impl Send for MeanFieldGameSolver
impl Sync for MeanFieldGameSolver
impl Unpin for MeanFieldGameSolver
impl UnsafeUnpin for MeanFieldGameSolver
impl UnwindSafe for MeanFieldGameSolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more