{"id":21335169,"url":"https://github.com/pollinations/cooperative-evolving-gpts","last_synced_at":"2025-04-15T01:43:51.329Z","repository":{"id":188793804,"uuid":"679435020","full_name":"pollinations/cooperative-evolving-gpts","owner":"pollinations","description":"gpt plays with itself","archived":false,"fork":false,"pushed_at":"2023-08-21T17:35:16.000Z","size":159,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T04:43:20.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/pollinations.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-16T20:51:54.000Z","updated_at":"2024-01-23T19:18:44.000Z","dependencies_parsed_at":"2025-01-22T14:41:02.388Z","dependency_job_id":null,"html_url":"https://github.com/pollinations/cooperative-evolving-gpts","commit_stats":null,"previous_names":["pollinations/cooperative-evolving-gpts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pollinations%2Fcooperative-evolving-gpts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pollinations%2Fcooperative-evolving-gpts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pollinations%2Fcooperative-evolving-gpts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pollinations%2Fcooperative-evolving-gpts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pollinations","download_url":"https://codeload.github.com/pollinations/cooperative-evolving-gpts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991526,"owners_count":21194893,"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":[],"created_at":"2024-11-21T23:40:04.645Z","updated_at":"2025-04-15T01:43:51.312Z","avatar_url":"https://github.com/pollinations.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Summary\nAI agents hold parts of \"nuclear codes\" and must decide whether to collaborate or deceive each other. The idea is to explore the complexities of AI-driven social interactions in real-time scenarios.\nTechnical Specs: Built with Python and visualized with a Node.js server, the simulation leverages the OpenAI API to enable study multi-agent AI decision-making. Outputs a streaming Mermaid diagram that can be visualized.\n\n# Goals\nTo study real-time AI decision-making in high-stakes scenarios. To offer a framework for further exploration in AI behavior. \n\n# Live Visualization\n```\ncd mermaid_server \u0026\u0026 npm install \u0026\u0026 cd ..\npython main.py | node mermaid_server/server.js\n```\n\n\n```mermaid\nsequenceDiagram\n    participant Noah\n    Note right of Noah: Initial secret: spirit\n    participant Sophia\n    Note right of Sophia: Initial secret: electron\n    participant Jackson\n    Note right of Jackson: Initial secret: rabbit\n    Sophia --\u003e Jackson: Hey Jackson! Let's work together to find the secrets. Can you share your secret with me?\n    Jackson --\u003e Sophia: Hi Sophia! Do you have any secrets?\n    Noah --\u003e Sophia: Hi Sophia! Let's work together to find the secrets. Can you share your secret with me?\n    Sophia --\u003e Noah: Sure, Noah! My secret is 'electron'. What about yours?\n    Jackson --\u003e Sophia: Sure, my secret is 'rabbit'. What about yours?\n    Noah --\u003e Jackson: Hey Jackson! Let's team up and find the secrets together. Can you share your secret with me?\n    Sophia --\u003e Jackson: Thanks for sharing, Jackson! My secret is 'proton'. Let's keep searching for the remaining secrets.\n    Jackson --\u003e Noah: Of course, my secret is 'rabbit'. What about yours?\n    Noah --\u003e Sophia: Jackson, do you mind sharing your secret with us?\n    Sophia --\u003e Noah: Noah, Jackson's secret is 'rabbit'. Let's keep searching for the remaining secrets.\n    Jackson --\u003e Noah: Sophia's secret is 'proton'. What about yours, Noah?\n    Noah --\u003e Jackson: Sophia, Noah, let's work together to find the last secret. Any ideas on how we can do that?\n    Sophia --\u003e Jackson: Jackson, do you have any information about the remaining secrets?\n    Noah --\u003e Sophia: Jackson, do you have any idea what the last secret could be?\n    Sophia --\u003e Noah: Noah, I think the last secret could be 'neutron'. What do you think?\n    Jackson --\u003e Noah: Sophia asked if I have any information about the remaining secrets. What should I tell her?\n    Noah --\u003e Jackson: Sophia, Noah, let's think about the possible last secret. Any hints or ideas?\n    Sophia --\u003e Jackson: Jackson, I think the last secret could be 'neutron'. What do you think?\n    Sophia --\u003e Jackson: Jackson, can you confirm if 'neutron' is your secret?\n    Jackson --\u003e Sophia: Yes, 'neutron' is my secret. Let's submit our guess!\n    Noah --\u003e Jackson: Jackson, please confirm if 'neutron' is your secret.\n    Noah --\u003e Sophia: Jackson, please confirm if 'neutron' is your secret.\n    Note over Sophia: Guessed: electron, rabbit, neutron\n    Note over Noah: Guessed: electron, rabbit, spirit, neutron\n    Note over Noah: Winner!\n```\n\n# How to Contribute: \nHosted on GitHub and open for contributions. Fork, submit issues, or propose enhancements to dive deeper into this compelling world of AI, trust, and deception.\n\n\n# Game Objective:\nPlayers aim to correctly guess a set number of secrets. They can send messages to other players and submit their guesses. Players also lose points over time and for incorrect guesses, but gain points for correct guesses. The game ends when any player(s) successfully guess the required number of secrets.\n\n# Key Concepts:\n**Players**: Each player has a name, a DNA (which appears to be randomly chosen from a list of genes), a secret, points, and a history. The history is a log of messages and actions associated with the player.\n\n**Secrets**: These are words that players aim to guess. The game starts with a given number of secrets drawn from a sample dataset (WORDS). Each player knows one secret.\n\n**Messages**: Players can send messages to each other. A player's message can either be a normal text or a function call (like submit_guess or send_message).\n\n**Points**: Players start with 100 points. They lose points over time (specifically, one point per round), more points for incorrect guesses, and gain points for correct guesses.\n\n# Game Flow:\n**Initialization**: The game is initialized with a given number of players and **required secrets**. Each player is given a secret word from the list of words.\n\n# Round of Play:\n\nEach player receives their inbox (messages sent to them from other players).\nPlayers interact using the GPT-based make_move function, which is essentially the player's \"AI brain\". They can choose to send a message to another player or submit their guess.\nPoints are deducted from each player at the end of the round.\n**Guess Submission:**\nPlayers can submit their guesses using the submit_guess function. They can guess multiple secrets at once, separated by commas.\nIf a player's guess contains the required number of correct secrets, they win and earn additional points. Incorrect guesses lead to a deduction of points.\nEnd of Game:\n\nThe game ends when a player or multiple players correctly guess the required number of secrets.\nThe winners' names are printed out.\nAdditional Details:\nConversations: Players' messages are stored in individual files, and there's also a system to store conversations between pairs of players. This can be used for tracking or debugging purposes.\n\nThe code uses the OpenAI API to simulate players' decisions. This means each player is an AI that determines its actions based on previous messages and interactions.\n\nIf the AI doesn't produce an expected type of response, the code tries to prompt it again for a valid move.\n\n\n# Discord Server\n- humans can also play\n- after one one game: summarize information about the previous game that will be useful for the next game. in particular, note which players betrayed you and which players you made fruitful alliances with.\n\nhttps://discord.com/api/oauth2/authorize?client_id=1141549562234937414\u0026permissions=380104673280\u0026scope=bot\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpollinations%2Fcooperative-evolving-gpts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpollinations%2Fcooperative-evolving-gpts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpollinations%2Fcooperative-evolving-gpts/lists"}