AI availability blocks -- questions and discussion

I want to have a deeper understanding of how the AI availability blocks work so that I might use them to their fullest capability.
I grepped all of the cards in the CW to see which AI Availability blocks are in use.
These are pretty clear -- you use them to represent other players' turns within which the AI can play the card:
There are others that appear to be similar, but have window_step instead of step and they have type="window". What is the difference?
There are some that appear to be used for the step regardless of whose turn it is:
There are some that appear to be used for the step regardless of whose turn it is, but these are window_step instead of step:
There appears to be one that is specific to "my turn" (AI's turn) but does not have window_step:
These are the "window" versions for "my turn":
These have window_in_combat="1" -- what does that signify beyond the normal tags?
This one has blocking_or_blocked="1" -- does this mean that it is only available if it is the declar_blockers step and the creature is blocking or blocked?
These have restriction in their tags. How do these work?
These have in_response but I'm confused by response_source and response_target (as well as in_response_dangerous) -- how do these work?
I grepped all of the cards in the CW to see which AI Availability blocks are in use.
These are pretty clear -- you use them to represent other players' turns within which the AI can play the card:
- <AI_AVAILABILITY step="begin_combat" turn="their_turn" />
<AI_AVAILABILITY step="declare_attackers" turn="their_turn" />
<AI_AVAILABILITY step="end_of_turn" turn="their_turn" />
There are others that appear to be similar, but have window_step instead of step and they have type="window". What is the difference?
- <AI_AVAILABILITY window_step="upkeep" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="their_turn" />
<AI_AVAILABILITY window_step="main_1" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" window_turn="their_turn" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="their_turn" type="window" />
There are some that appear to be used for the step regardless of whose turn it is:
- <AI_AVAILABILITY step="declare_blockers" />
<AI_AVAILABILITY step="end_of_turn" />
There are some that appear to be used for the step regardless of whose turn it is, but these are window_step instead of step:
- <AI_AVAILABILITY window_step="untap" />
<AI_AVAILABILITY window_step="untap" type="window" />
<AI_AVAILABILITY window_step="upkeep" />
<AI_AVAILABILITY window_step="upkeep" type="window" />
<AI_AVAILABILITY window_step="main" type="window" />
<AI_AVAILABILITY window_step="main1" type="window" />
<AI_AVAILABILITY window_step="begin_combat" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" type="window" />
There appears to be one that is specific to "my turn" (AI's turn) but does not have window_step:
- <AI_AVAILABILITY step="main_1" turn="my_turn" />
These are the "window" versions for "my turn":
- <AI_AVAILABILITY window_step="upkeep" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="begin_combat" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
<AI_AVAILABILITY window_step="end_of_turn" window_turn="my_turn" type="window" />
These have window_in_combat="1" -- what does that signify beyond the normal tags?
- <AI_AVAILABILITY window_step="declare_attackers" type="window" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_attackers" window_turn="my_turn" type="window" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_blockers" type="window" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_blockers" window_in_combat="1" />
<AI_AVAILABILITY window_step="declare_blockers" window_in_combat="1" type="window" />
<AI_AVAILABILITY window_step="declare_blockers" window_turn="my_turn" type="window" window_in_combat="1" />
This one has blocking_or_blocked="1" -- does this mean that it is only available if it is the declar_blockers step and the creature is blocking or blocked?
- <AI_AVAILABILITY step="declare_blockers" blocking_or_blocked="1" />
These have restriction in their tags. How do these work?
- <AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_FIRST_STRIKE" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_HASTE" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_HEXPROOF" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_INDEASTRUCTIBLE" />
<AI_AVAILABILITY type="restriction" restriction_characteristic="CHARACTERISTIC_TRAMPLE" />
<AI_AVAILABILITY type="restriction" restriction_type="equip" />
<AI_AVAILABILITY type="restriction" restriction_type="no_regeneration_shield" />
These have in_response but I'm confused by response_source and response_target (as well as in_response_dangerous) -- how do these work?
- <AI_AVAILABILITY type="in_response" />
<AI_AVAILABILITY type="in_response" response_source="1" />
<AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
<AI_AVAILABILITY type="in_response" response_target="1" />
<AI_AVAILABILITY type="in_response_dangerous" />