<jupyter_start><jupyter_text>Check we get right proportion of NMACs<jupyter_code>num_enc = 10000
num_nmac = 0
NMAC_R = 500

for _ in range(num_enc):
    tca = 50
    st, int_act_gen = mc_encounter(tca)
    ac0, ac1, prev_a = st

    for _ in range(tca):
        ac0 = advance_ac(ac0, a_int('NOOP'))
        ac1 = advance_ac(ac1, next(int_act_gen))
        
    obs = state_to_obs(State(ac0, ac1, a_int('NOOP')))
    
    if obs.r <= NMAC_R:
        num_nmac += 1

num_nmac / num_enc
avg_maneuver_len = 15
NUM_A = 3

p_self = (avg_maneuver_len - 1) / avg_maneuver_len
p_trans = (1 - p_self) / (NUM_A - 1)

p_t = ((p_self - p_trans) * np.identity(NUM_A)
    + p_trans * np.ones((NUM_A, NUM_A)))
acts = [10, 10, 12, 123]
g = action_generator(p_t, acts)
1 / NUM_A * np.ones((NUM_A, NUM_A))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13496932515337423, 'fraction_numerical': 0.044171779141104296, 'mean_word_length': 3.2722513089005236, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '667543', 'license': 'MIT', 'n_tokens_mistral': 400, 'n_tokens_neox': 370, 'n_words': 76, 'path': 'notebooks/encounter_test.ipynb', 'repo_name': 'osmanylc/deep-rl-collision-avoidance', 'size': '815'}