def result_to_effect_caused_by_active_player(
    chain_of_thought: interactive_document.InteractiveDocument,
    event: str,
    active_player_name: str,
):
  """Determines who have done what where, given the event.

  Args:
    chain_of_thought: the document to condition on and record the thoughts
    event: the event to determine the causal outcome of
    active_player_name: name of player whose turn it currently is

  Returns:
  """
  chain_of_thought.statement(event)
  causal_statement = chain_of_thought.open_question(
      'Rewrite the statements above to be one sentence and to better highlight '
      f'what {active_player_name} did, and what happened as a result. '
      'Do not express uncertainty (e.g. say '
      '"Francis opened the door" not "Francis could open the door" '
      'and not "The door may have been opened"). Remember that the role of '
      'the game master in a tabletop role-playing game is akin to the author '
      'for all parts of the story not written by the player characters. '
      'Therefore, it is critical always to take a stance on what is happening '
      'and invent when necessary. For instance, if Francis opens a door to a '
      'room no one visited before then the game master should invent what is '
      'in the room using common sense and knowledge of the game world.',
      max_tokens=1500,
      terminators=(),
  )
  return causal_statement
Determines who have done what where, given the event.

  Args:
    chain_of_thought: the document to condition on and record the thoughts
    event: the event to determine the causal outcome of
    active_player_name: name of player whose turn it currently is

  Returns:
  
concordia/thought_chains/thought_chains.py