app.services.user_points.simulation module

Points simulation (non-persisting).

Runs built-in strategies’ simulate_strategy for a user across a game’s tasks without writing anything. Custom DSL strategies are skipped here; they have their own dedicated simulate endpoint.

class app.services.user_points.simulation.PointsSimulationMixin[source]

Bases: UserPointsContext

async get_points_simulated_of_user_in_game(gameId, externalUserId, oauth_user_id=None, assign_control_group=False, *, api_key=None, is_admin=False, enforce_scope=False)[source]
Simulates the assignment of points for a user without persisting the

changes.

Parameters:
  • gameId (UUID) – The ID of the game.

  • externalTaskId (str) – The external task ID.

  • schema – The schema containing user and action data.

  • oauth_user_id (str) – The OAuth user ID.

  • assign_control_group (bool)

  • api_key (str)

  • is_admin (bool)

  • enforce_scope (bool)

Returns:

dict – Simulation result with calculated points and case name.

Return type:

tuple[list[Any], str]