random_init_state prolog function