POMDPPlanners.tests.test_planners.test_mcts_planners package
Subpackages
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero package
- Submodules
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_belief_representation module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_beta_zero module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_beta_zero_action_sampler module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_beta_zero_network module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_puct module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_training module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_beta_zero.test_training_buffer module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_constrained_zero package
- Submodules
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_constrained_zero.test_constrained_puct module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_constrained_zero.test_constrained_training module
TestComputeConstrainedZeroLossTestTrainConstrainedNetworkTestTrainConstrainedNetwork.test_all_metrics_present()TestTrainConstrainedNetwork.test_returns_failure_loss_metric()TestTrainConstrainedNetwork.test_track_gradients_adds_norm_keys()TestTrainConstrainedNetwork.test_track_gradients_false_excludes_norm_keys()TestTrainConstrainedNetwork.test_track_gradients_includes_failure_head()TestTrainConstrainedNetwork.test_training_reduces_loss()
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_constrained_zero.test_constrained_training_buffer module
TestConstrainedTrainingBufferTestConstrainedTrainingBuffer.test_add_and_length()TestConstrainedTrainingBuffer.test_begin_iteration_discards_old_data_with_n_buffer_1()TestConstrainedTrainingBuffer.test_clear()TestConstrainedTrainingBuffer.test_failure_targets_propagate()TestConstrainedTrainingBuffer.test_inherits_from_training_buffer()TestConstrainedTrainingBuffer.test_mixed_failure_targets()TestConstrainedTrainingBuffer.test_sample_batch_returns_four_arrays()
TestConstrainedTrainingExample
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_constrained_zero.test_constrained_zero module
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_constrained_zero.test_constrained_zero_network module
Submodules
POMDPPlanners.tests.test_planners.test_mcts_planners.test_icvar_pft_dpw module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_icvar_pomcpow module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_path_simulation_policy module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_pft_dpw module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_pomcp module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_pomcp_dpw module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_pomcpow module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_sparse_pft module
POMDPPlanners.tests.test_planners.test_mcts_planners.test_utils module
Shared test utilities for MCTS planners.
This module provides common test functions that can be reused across different MCTS planner tests to ensure consistent validation and reduce code duplication.
- POMDPPlanners.tests.test_planners.test_mcts_planners.test_utils.validate_tree_structure_with_progressive_widening(root_belief_node, planner, n_simulations, depth, k_o, k_a, alpha_o, alpha_a, action_sampler, expected_belief_type=None, planner_type='POMCP_DPW')[source]
Validates complete tree structure construction and node integrity for MCTS planners with progressive widening.
This function provides comprehensive validation of MCTS tree structures with double progressive widening, suitable for both POMCP_DPW and POMCPOW planners. It verifies tree structure, node integrity, progressive widening constraints, and value propagation.
- Parameters:
root_belief_node – Root belief node of the constructed tree
planner – The MCTS planner instance (POMCP_DPW or POMCPOW)
n_simulations – Number of simulations used to build the tree
depth – Maximum search depth parameter
k_o – Observation progressive widening coefficient
k_a – Action progressive widening coefficient
alpha_o – Observation progressive widening exponent
alpha_a – Action progressive widening exponent
action_sampler – Action sampler used by the planner
expected_belief_type – Expected belief type for non-root nodes (optional)
- Raises:
AssertionError – If any tree structure validation fails