pyphi.mcp.server.analyze#

pyphi.mcp.server.analyze(handle, state, subset=None, formalism=None, compute='full', detail='summary', confirm_large=False, parallel=None, workers=None)[source]#

Run an IIT analysis of a substrate in a state.

Parameters:
  • handle (str) – A substrate handle from load_example or build_substrate.

  • state (list of int) – The current state, one entry per node, in node order (little-endian).

  • subset (list of int or str, optional) – The candidate system: node indices or labels. Default analyzes the whole substrate. Units outside the subset are the background, causally marginalized conditional on the current state (Albantakis et al. 2023, Eqs. 3-4); see get_iit_reference("theory").

  • formalism (str, optional) – Leave unset for IIT. Pass an earlier version ("IIT_4_0_2023" or "IIT_3_0") only to reproduce published results; read get_iit_reference("configuration") first.

  • compute (str) –

    "full" (default: system integrated information φₛ and the full Φ-structure), "sia" (φₛ only), "ces" (the cause-effect structure), or "distinctions" (the distinctions alone).

    "distinctions" is the only one that skips the system-partition search, which a cause-effect structure otherwise runs before unfolding anything; over a sparse substrate that search is almost the entire cost. It reports congruence in the summary: "resolved" means the distinctions are exactly the Φ-structure’s, while "unresolved" means the system’s specified state is tied and the congruent subset is undetermined — the counts then come back under _upper_bound names and must not be reported as the structure’s.

  • detail (str) – "summary" (default: a readable card plus scalar values) or "full" (also embeds the complete serialized result, which can be megabytes for a Φ-structure — prefer inspect to drill in instead).

  • confirm_large (bool) – An analysis whose estimated workload exceeds a soft limit is refused unless this is set, to avoid accidentally starting an hours-long computation. The workload is counted by the same machinery as the estimate_cost tool, so the partition schemes, connectivity, and alphabet all inform the guard. Parallelism does not lift the threshold — it divides the constants, not the exponents.

  • parallel (bool or list of str, optional) – Parallelism for this call only. None (default) uses the server’s current configuration (see configure_parallel); true runs on multiple cores at the recommended levels ("partitions", "purviews", "distinctions"); a list of level names picks the levels explicitly; false forces the call fully sequential. Parallelism never changes the result, and workloads below a level’s sequential threshold run sequentially regardless. Read get_iit_reference("parallelization") for which levels pay off.

  • workers (int, optional) – Worker-process count for this call. Default uses the server’s configuration (-1 = all cores).

Returns:

dict – A card (human-readable text), a summary of scalar quantities, and a result_ref for inspect. φₛ = 0 means the system does not exist as one whole, not that it has no structure: either some partition makes no difference (the system is reducible), or the system provides itself no repertoire of alternatives (ii(s) = 0; see requirement_binding).

Return type:

dict[str, Any]