{"id":22928121,"url":"https://github.com/egemenciftci/tetrisbotchallenge","last_synced_at":"2025-10-06T15:30:15.940Z","repository":{"id":191509931,"uuid":"684788487","full_name":"EgemenCiftci/TetrisBotChallenge","owner":"EgemenCiftci","description":"Tetris bot that uses 4 parameters to make the optimal decision.","archived":false,"fork":false,"pushed_at":"2023-09-22T07:15:25.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T10:34:43.333Z","etag":null,"topics":["bot","console-application","csharp","netcore","tetris-game"],"latest_commit_sha":null,"homepage":"","language":"C#","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/EgemenCiftci.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":"2023-08-29T21:24:09.000Z","updated_at":"2023-09-08T15:54:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"c796c854-c2d9-4eff-8046-789d963d9894","html_url":"https://github.com/EgemenCiftci/TetrisBotChallenge","commit_stats":null,"previous_names":["egemenciftci/tetrisbotchallenge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EgemenCiftci/TetrisBotChallenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgemenCiftci%2FTetrisBotChallenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgemenCiftci%2FTetrisBotChallenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgemenCiftci%2FTetrisBotChallenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgemenCiftci%2FTetrisBotChallenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EgemenCiftci","download_url":"https://codeload.github.com/EgemenCiftci/TetrisBotChallenge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgemenCiftci%2FTetrisBotChallenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278635289,"owners_count":26019747,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bot","console-application","csharp","netcore","tetris-game"],"created_at":"2024-12-14T09:17:30.739Z","updated_at":"2025-10-06T15:30:15.906Z","avatar_url":"https://github.com/EgemenCiftci.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tetris Bot Challenge\n\n## Goal\nCreate a Tetris bot that gets the maximum score in 10 random games.\n\n## Idea\nIf I create a fixed set of 1000 games and create a bot that will get the maximum average score, it will play well in 10 random games.\n\n## Methodology\n1. Simulate every rotation and position​\n2. Calculate objective value​\n3. Select the rotation and position where the objective value is best​\n4. Apply the rotation and position\n\n## Objective Value​\n- Aggregate height\n- Cleared lines\n- Holes\n- Bumpiness\n\n## Objective Function\nOV = CL×CLW – AH×AHW – H×HW – B×BW\n\nOV: Objective Value​\\\nCL: Cleared Lines​\\\nCLW: Cleared Lines Weight​\\\nAH: Aggregate Height​\\\nAHW: Aggregate Height Weight​\\\nH: Holes​\\\nHW: Holes Weight​\\\nB: Bumpiness​\\\nBW: Bumpiness Weight\n\n## Weight Optimization\n### 1. One-digit brute-force search​\n- Searched between 0 and 9 for each weight​\n- 10 × 10 × 10 × 10 = 10000 iterations​\n- Played 1000 games​\n- The total duration is 11 hours ​\n- The best score per game is 1513.333​\n- Best parameters are 9 | 9 | 9 | 4​\n\n### 2. Two-digit brute-force search​\n- 90 | 90 | 90 | 40 gives same results as 9 | 9 | 9 | 4​\n- Searched between -5 and +5 for each weight​\n- 10 × 10 × 10 × 10 = 10000 iterations​\n- Played 1000 games​\n- The total duration was 22 hours ​\n- The best score per game is 1589.222​\n- Best parameters are 89 | 92 | 89 | 40\n\n### 3. Three-digit brute-force search\n- 890 | 920 | 890 | 400 gives same results as 89 | 92 | 89 | 40​\n- Searched between -5 and +5 for each weight​\n- 10 × 10 × 10 × 10 = 10000 iterations​\n- Played 1000 games​\n- The total duration was 26 hours ​\n- The best score per game is 1589.222​\n- There is no improvement in the best score\n\n## Results \u0026 Conclusion\n- The current average score per game is 1589 for 1,000 games​\n- This is a simple solution​\n- It can be further optimized using more parameters and different optimization algorithms\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegemenciftci%2Ftetrisbotchallenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegemenciftci%2Ftetrisbotchallenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegemenciftci%2Ftetrisbotchallenge/lists"}