Created
June 12, 2017 14:33
-
-
Save unixpickle/806358b8541eb2e4b6b20e29845c31b4 to your computer and use it in GitHub Desktop.
Count Universe Environments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JSON_URL=https://raw.githubusercontent.com/openai/universe/master/universe/runtimes/flashgames.json | |
JSON="$(curl -s $JSON_URL)" | |
ALL_NAMES=$(echo "$JSON" | jq -r 'to_entries[] | select(.value.rewarder) | select(.value.autostart) | .key') | |
echo "Total environments:" | |
echo "$ALL_NAMES" | sort -u | wc -l | |
echo "Unique environments:" | |
echo "$ALL_NAMES" | sed -E 's/Lvl[0-9]*-/-/g' | sort -u | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment