{"id":13805793,"url":"https://github.com/daugaard/q-learning-simple-game","last_synced_at":"2026-04-03T19:40:00.132Z","repository":{"id":136977364,"uuid":"100186817","full_name":"daugaard/q-learning-simple-game","owner":"daugaard","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-03T21:18:32.000Z","size":14,"stargazers_count":37,"open_issues_count":1,"forks_count":17,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T01:05:26.365Z","etag":null,"topics":["ai","ml","q-learning","reinforcement-learning","ruby","rubyml"],"latest_commit_sha":null,"homepage":"https://www.practicalai.io/teaching-ai-play-simple-game-using-q-learning/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daugaard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-13T15:40:55.000Z","updated_at":"2023-03-16T13:43:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"2723b45b-1914-40b9-a085-6530835a1881","html_url":"https://github.com/daugaard/q-learning-simple-game","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daugaard%2Fq-learning-simple-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daugaard%2Fq-learning-simple-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daugaard%2Fq-learning-simple-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daugaard%2Fq-learning-simple-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daugaard","download_url":"https://codeload.github.com/daugaard/q-learning-simple-game/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254030981,"owners_count":22002681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ml","q-learning","reinforcement-learning","ruby","rubyml"],"created_at":"2024-08-04T01:01:04.890Z","updated_at":"2026-04-03T19:40:00.123Z","avatar_url":"https://github.com/daugaard.png","language":"Ruby","funding_links":[],"categories":[":sparkles: Tutorials"],"sub_categories":[],"readme":"# Example of reinforcement learning using q-learning to teach an AI to play a game in Ruby\nThis example will show how we can teach an AI to play a simple game using the Q-learning reinforcement learning algorithm.\n\nThis is implemented in pure Ruby without any external dependencies.\n\nTo run the game and play a human run:\n\n```\n$ ruby run.rb\n```\n\nTo run the game and let the AI play run:\n\n```\n$ ruby run-q.rb\n```\n\nFor more information about how this is implemented see [Teaching an AI to play a simple game using q-learning](http://www.practicalai.io/teaching-ai-play-simple-game-using-q-learning/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaugaard%2Fq-learning-simple-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaugaard%2Fq-learning-simple-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaugaard%2Fq-learning-simple-game/lists"}