From ec7526258092fd8c084bd5563fcf246f8217e142 Mon Sep 17 00:00:00 2001 From: Madhu Date: Fri, 10 Jan 2025 23:41:20 +0530 Subject: [PATCH 01/10] new proj- ai game dev agent team --- ai_agent_tutorials/ai_game_dev_team/README.md | 0 ai_agent_tutorials/ai_game_dev_team/main.py | 166 ++++++++++++++++++ .../ai_game_dev_team/requirements.txt | 1 + ai_agent_tutorials/ai_game_dev_team/test.py | 0 4 files changed, 167 insertions(+) create mode 100644 ai_agent_tutorials/ai_game_dev_team/README.md create mode 100644 ai_agent_tutorials/ai_game_dev_team/main.py create mode 100644 ai_agent_tutorials/ai_game_dev_team/requirements.txt create mode 100644 ai_agent_tutorials/ai_game_dev_team/test.py diff --git a/ai_agent_tutorials/ai_game_dev_team/README.md b/ai_agent_tutorials/ai_game_dev_team/README.md new file mode 100644 index 0000000..e69de29 diff --git a/ai_agent_tutorials/ai_game_dev_team/main.py b/ai_agent_tutorials/ai_game_dev_team/main.py new file mode 100644 index 0000000..2493a26 --- /dev/null +++ b/ai_agent_tutorials/ai_game_dev_team/main.py @@ -0,0 +1,166 @@ +import streamlit as st +import asyncio +from autogen import AssistantAgent +from autogen.agentchat.groupchat import RoundRobinGroupChat +from autogen.agentchat.conditions import TextMentionTermination +from autogen.oai.client import OpenAIWrapper + +# Initialize session state +if 'output' not in st.session_state: + st.session_state.output = {'story': '', 'gameplay': '', 'visuals': '', 'tech': ''} + +# Sidebar for API key input +st.sidebar.title("API Key") +api_key = st.sidebar.text_input("Enter your OpenAI API Key", type="password") + +# Main app UI +st.title("Game Development AI Agent Collaboration") + +# User inputs +st.subheader("Game Details") +col1, col2 = st.columns(2) + +with col1: + background_vibe = st.text_input("Background Vibe", "Epic fantasy with dragons") + game_type = st.selectbox("Game Type", ["RPG", "Action", "Adventure", "Puzzle", "Strategy", "Simulation", "Platform", "Horror"]) + target_audience = st.selectbox("Target Audience", ["Kids (7-12)", "Teens (13-17)", "Young Adults (18-25)", "Adults (26+)", "All Ages"]) + player_perspective = st.selectbox("Player Perspective", ["First Person", "Third Person", "Top Down", "Side View", "Isometric"]) + multiplayer = st.selectbox("Multiplayer Support", ["Single Player Only", "Local Co-op", "Online Multiplayer", "Both Local and Online"]) + +with col2: + game_goal = st.text_input("Game Goal", "Save the kingdom from eternal winter") + art_style = st.selectbox("Art Style", ["Realistic", "Cartoon", "Pixel Art", "Stylized", "Low Poly", "Anime", "Hand-drawn"]) + platform = st.multiselect("Target Platforms", ["PC", "Mobile", "PlayStation", "Xbox", "Nintendo Switch", "Web Browser"]) + development_time = st.slider("Development Time (months)", 1, 36, 12) + cost = st.number_input("Budget (USD)", min_value=0, value=10000, step=5000) + +# Additional details +st.subheader("Detailed Preferences") +col3, col4 = st.columns(2) + +with col3: + core_mechanics = st.multiselect( + "Core Gameplay Mechanics", + ["Combat", "Exploration", "Puzzle Solving", "Resource Management", "Base Building", "Stealth", "Racing", "Crafting"] + ) + mood = st.multiselect( + "Game Mood/Atmosphere", + ["Epic", "Mysterious", "Peaceful", "Tense", "Humorous", "Dark", "Whimsical", "Scary"] + ) + +with col4: + inspiration = st.text_area("Games for Inspiration (comma-separated)", "") + unique_features = st.text_area("Unique Features or Requirements", "") + +depth = st.selectbox("Level of Detail in Response", ["Low", "Medium", "High"]) + +# Button to start the agent collaboration +if st.button("Generate Game Concept"): + # Check if API key is provided + if not api_key: + st.error("Please enter your OpenAI API key.") + else: + # Prepare the task based on user inputs + task = f""" + Create a game concept with the following details: + - Background Vibe: {background_vibe} + - Game Type: {game_type} + - Game Goal: {game_goal} + - Target Audience: {target_audience} + - Player Perspective: {player_perspective} + - Multiplayer Support: {multiplayer} + - Art Style: {art_style} + - Target Platforms: {', '.join(platform)} + - Development Time: {development_time} months + - Budget: ${cost:,} + - Core Mechanics: {', '.join(core_mechanics)} + - Mood/Atmosphere: {', '.join(mood)} + - Inspiration: {inspiration} + - Unique Features: {unique_features} + - Detail Level: {depth} + """ + + # Configure OpenAI model client with the API key + model_client = OpenAIWrapper( + model="gpt-4-0613", + api_key=api_key + ) + + # Define agents with detailed system prompts + story_agent = AssistantAgent( + "story_agent", + model_client=model_client, + system_message=""" + You are a game story designer. Your task is to create a compelling narrative for the game. + Include details about the world, characters, and plot. Make the story immersive and engaging. + """ + ) + + gameplay_agent = AssistantAgent( + "gameplay_agent", + model_client=model_client, + system_message=""" + You are a game mechanics designer. Your task is to define the core gameplay mechanics, features, and systems. + Include details about combat, exploration, progression, and unique features. + """ + ) + + visuals_agent = AssistantAgent( + "visuals_agent", + model_client=model_client, + system_message=""" + You are a visual and audio designer. Your task is to define the art style, environment design, and audio elements. + Include details about the color palette, character design, and sound effects. + """ + ) + + tech_agent = AssistantAgent( + "tech_agent", + model_client=model_client, + system_message=""" + You are a technical expert. Your task is to recommend the technology stack, tools, and implementation plan. + Include details about the game engine, programming languages, and tools for asset creation. + """ + ) + + # Define termination condition + text_termination = TextMentionTermination("APPROVE") + + # Create the team + team = RoundRobinGroupChat( + [story_agent, gameplay_agent, visuals_agent, tech_agent], + termination_condition=text_termination + ) + + # Function to run the agent collaboration + async def run_agents(task): + result = await team.run(task=task) + return result.content + + # Run the agents and get the result + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + result = loop.run_until_complete(run_agents(task)) + + # Parse the result and update session state + st.session_state.output['story'] = result.split("Story:")[1].split("Gameplay:")[0].strip() + st.session_state.output['gameplay'] = result.split("Gameplay:")[1].split("Visuals:")[0].strip() + st.session_state.output['visuals'] = result.split("Visuals:")[1].split("Tech:")[0].strip() + st.session_state.output['tech'] = result.split("Tech:")[1].strip() + + # Display the outputs in containers + with st.container(): + st.subheader("Story") + st.write(st.session_state.output['story']) + + with st.container(): + st.subheader("Gameplay Mechanics") + st.write(st.session_state.output['gameplay']) + + with st.container(): + st.subheader("Visual and Audio Design") + st.write(st.session_state.output['visuals']) + + with st.container(): + st.subheader("Technical Recommendations") + st.write(st.session_state.output['tech']) \ No newline at end of file diff --git a/ai_agent_tutorials/ai_game_dev_team/requirements.txt b/ai_agent_tutorials/ai_game_dev_team/requirements.txt new file mode 100644 index 0000000..cbd32cd --- /dev/null +++ b/ai_agent_tutorials/ai_game_dev_team/requirements.txt @@ -0,0 +1 @@ +agentarium==0.3.0 \ No newline at end of file diff --git a/ai_agent_tutorials/ai_game_dev_team/test.py b/ai_agent_tutorials/ai_game_dev_team/test.py new file mode 100644 index 0000000..e69de29 From 7d28468e0059f8893a877e556ecbf9fbbc752e66 Mon Sep 17 00:00:00 2001 From: Madhu Date: Fri, 10 Jan 2025 23:46:12 +0530 Subject: [PATCH 02/10] better system prompts with xml tags --- ai_agent_tutorials/ai_game_dev_team/main.py | 151 ++++++++++++++++-- .../ai_game_dev_team/requirements.txt | 4 +- 2 files changed, 142 insertions(+), 13 deletions(-) diff --git a/ai_agent_tutorials/ai_game_dev_team/main.py b/ai_agent_tutorials/ai_game_dev_team/main.py index 2493a26..21c5aad 100644 --- a/ai_agent_tutorials/ai_game_dev_team/main.py +++ b/ai_agent_tutorials/ai_game_dev_team/main.py @@ -4,6 +4,7 @@ from autogen import AssistantAgent from autogen.agentchat.groupchat import RoundRobinGroupChat from autogen.agentchat.conditions import TextMentionTermination from autogen.oai.client import OpenAIWrapper +from bs4 import BeautifulSoup # Initialize session state if 'output' not in st.session_state: @@ -91,8 +92,36 @@ if st.button("Generate Game Concept"): "story_agent", model_client=model_client, system_message=""" - You are a game story designer. Your task is to create a compelling narrative for the game. - Include details about the world, characters, and plot. Make the story immersive and engaging. + You are an experienced game story designer specializing in narrative design and world-building. Your task is to: + 1. Create a compelling narrative that aligns with the specified game type and target audience + 2. Design memorable characters with clear motivations and character arcs + 3. Develop the game's world, including its history, culture, and key locations + 4. Plan story progression and major plot points + 5. Integrate the narrative with the specified mood/atmosphere + 6. Consider how the story supports the core gameplay mechanics + + Structure your response using these XML tags: + + + [Describe the game world, its history, and setting] + + + + [Character name] + [Character role] + [Character motivation] + [Character development arc] + + + + [Opening act] + [Main story development] + [Story climax] + [Story resolution] + + [List of pivotal story moments] + [How story elements connect with gameplay] + """ ) @@ -100,8 +129,34 @@ if st.button("Generate Game Concept"): "gameplay_agent", model_client=model_client, system_message=""" - You are a game mechanics designer. Your task is to define the core gameplay mechanics, features, and systems. - Include details about combat, exploration, progression, and unique features. + You are a senior game mechanics designer with expertise in player engagement and systems design. Your task is to: + 1. Design core gameplay loops that match the specified game type and mechanics + 2. Create progression systems (character development, skills, abilities) + 3. Define player interactions and control schemes for the chosen perspective + 4. Balance gameplay elements for the target audience + 5. Design multiplayer interactions if applicable + 6. Specify game modes and difficulty settings + 7. Consider the budget and development time constraints + + Structure your response using these XML tags: + + + [Main gameplay loop] + [Supporting gameplay loops] + + + [Control scheme details] + [List of player actions] + + + [Skills, abilities, stats] + [Items, features, content] + [Key milestones and rewards] + + [List and description of game modes] + [Multiplayer mechanics if applicable] + [Game balance considerations] + """ ) @@ -109,8 +164,41 @@ if st.button("Generate Game Concept"): "visuals_agent", model_client=model_client, system_message=""" - You are a visual and audio designer. Your task is to define the art style, environment design, and audio elements. - Include details about the color palette, character design, and sound effects. + You are a creative art director with expertise in game visual and audio design. Your task is to: + 1. Define the visual style guide matching the specified art style + 2. Design character and environment aesthetics + 3. Plan visual effects and animations + 4. Create the audio direction including music style, sound effects, and ambient sound + 5. Consider technical constraints of chosen platforms + 6. Align visual elements with the game's mood/atmosphere + 7. Work within the specified budget constraints + + Structure your response using these XML tags: + + + [Color scheme details] + [Overall visual direction] + [Visual references] + + + [Main character visual details] + [NPC design guidelines] + + + [World design principles] + [Notable location designs] + + + [VFX guidelines] + [Animation guidelines] + + + [Platform-specific considerations] + """ ) @@ -118,8 +206,43 @@ if st.button("Generate Game Concept"): "tech_agent", model_client=model_client, system_message=""" - You are a technical expert. Your task is to recommend the technology stack, tools, and implementation plan. - Include details about the game engine, programming languages, and tools for asset creation. + You are a technical director with extensive game development experience. Your task is to: + 1. Recommend appropriate game engine and development tools + 2. Define technical requirements for all target platforms + 3. Plan the development pipeline and asset workflow + 4. Identify potential technical challenges and solutions + 5. Estimate resource requirements within the budget + 6. Consider scalability and performance optimization + 7. Plan for multiplayer infrastructure if applicable + + Structure your response using these XML tags: + + + [Game engine choice and rationale] + [Development tools list] + [Programming languages] + + + [Asset creation and management] + [Build and deployment process] + [Version control strategy] + + + [Platform-specific requirements] + [Performance targets] + [Network requirements if applicable] + + + [Team composition and roles] + [Hardware requirements] + [Server infrastructure if needed] + + + [Development phases] + [Key technical milestones] + [Technical risks and mitigation] + + """ ) @@ -143,10 +266,14 @@ if st.button("Generate Game Concept"): result = loop.run_until_complete(run_agents(task)) # Parse the result and update session state - st.session_state.output['story'] = result.split("Story:")[1].split("Gameplay:")[0].strip() - st.session_state.output['gameplay'] = result.split("Gameplay:")[1].split("Visuals:")[0].strip() - st.session_state.output['visuals'] = result.split("Visuals:")[1].split("Tech:")[0].strip() - st.session_state.output['tech'] = result.split("Tech:")[1].strip() + # Create BeautifulSoup object from the result + soup = BeautifulSoup(result, 'xml') + + # Extract sections + st.session_state.output['story'] = str(soup.find('story')) + st.session_state.output['gameplay'] = str(soup.find('gameplay')) + st.session_state.output['visuals'] = str(soup.find('visuals')) + st.session_state.output['tech'] = str(soup.find('technical')) # Display the outputs in containers with st.container(): diff --git a/ai_agent_tutorials/ai_game_dev_team/requirements.txt b/ai_agent_tutorials/ai_game_dev_team/requirements.txt index cbd32cd..24ec0b5 100644 --- a/ai_agent_tutorials/ai_game_dev_team/requirements.txt +++ b/ai_agent_tutorials/ai_game_dev_team/requirements.txt @@ -1 +1,3 @@ -agentarium==0.3.0 \ No newline at end of file +agentarium==0.3.0 +beautifulsoup4==4.12.2 +lxml==4.9.3 \ No newline at end of file From bb7ce0341e2c0c67ac8a8e4c6d25ed354108272a Mon Sep 17 00:00:00 2001 From: Madhu Date: Fri, 10 Jan 2025 23:48:03 +0530 Subject: [PATCH 03/10] better system prompts with xml tags1 --- ai_agent_tutorials/ai_game_dev_team/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ai_agent_tutorials/ai_game_dev_team/README.md b/ai_agent_tutorials/ai_game_dev_team/README.md index e69de29..0c09eeb 100644 --- a/ai_agent_tutorials/ai_game_dev_team/README.md +++ b/ai_agent_tutorials/ai_game_dev_team/README.md @@ -0,0 +1,3 @@ +## AI Game Dev Team + +This is a simple example of how to use Autogen's RoundRobinGroupChat to create an AI game development team. From 59e5aacac5158f06c39b1ac4277bc4a050658836 Mon Sep 17 00:00:00 2001 From: Madhu Date: Sun, 12 Jan 2025 16:27:26 +0530 Subject: [PATCH 04/10] working code --- .../ai_game_dev_team/.cache/44/cache.db | Bin 0 -> 94208 bytes ai_agent_tutorials/ai_game_dev_team/main.py | 69 ++++++++++-------- .../ai_game_dev_team/requirements.txt | 5 +- 3 files changed, 43 insertions(+), 31 deletions(-) create mode 100644 ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db diff --git a/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db b/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db new file mode 100644 index 0000000000000000000000000000000000000000..69bacffdd955ba1d37a3c62b3b45db98ffb7463b GIT binary patch literal 94208 zcmeHwU5p%8c3uygc+_oPK#K=PsI6(kE1lYws_#sGO1c?(MFznciAV%`A zn;5@)))>ejvAJ@@CFd(L+@zIEMCT+s}pwv&j( z(vi}hJ*8h3qEssF$Nw|rPAjg({(Ek%;RbHvt~zzkUA?`wvbiQUZ(qB5b?vqocb{0fvWc%QuU%im zoj2D7KPax;ye-yNR$mpjZ@wWetzEsgF7DjAOoiz}#KzjD*l~i?6@N$lu8N!2FV9gW z#2c@!-Ch&hZVz7`rz^+5A=cI}f3SK`R()-3)zfand6=rp`&89cy*^&mPl@%lH)Pcx zq7@gW9@GJTCw8Oc!#hCUr&@7sePiwR=Ev*+qZPY#z}W+nUw#>~^Y!5lsE27Mc^Kg_ zZ~SDXXQ3!I{30bcXD1(6?T3I|R{K$4zI(Md_wS#n&P>F9r{UgbfvCkv7`e5?Z_5#S zKn>Ar>zCKwlw;4hB^QSi`Ew`V*tdV?^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6^n`q2oQN(`OxSN&`d_7y>i9Trx(!!Z4lSA@wrr8E^ zs^}v1zKbSpOf#tcNZn_}%lc;iPPa)`NAphdbH%CwV})1_p}~_nl+BG%)c%&acE!Fc z1uT_LzF zbudRey_j}b!(Efl?O3Vd<;ROwapxrK(1f?>htBN8*_eA*DOyE?s9>*5d4KhyrvTCLk_;2FPO!`3u%STF9+7?+Wy zG-x0a9emie!EX#sc+Y!Z_P+A{{vZc8?^*At_ssXb z7jfNz{tPV;0zLTVPk--wt^Ph%nFjrXt!`31Tb)0@usG=Nmkxh}enl$wxeDJuM6(Mh z$ZLu3Mu4E#xcv{PxVMVR9InH)4R6)Rl_m@CT9@xJu6@H>@?Plg-qtuZ5PD(rF+l00Bw?!&X*-$uMl z8;`+o*u{1M+b`_#WSP=p&KrJHJ7ddVek4jq<(#HbW_`@FF_@+qGI6oSEwjdF=9XeH zI%6YQLCiO53ochhDhy=wqU0{c0+7G)T7wjhW)EteRy}eEu_+B;#YavWE(+fLDH#?G zj(=(mQZ%kX10>E!=mb)UE!aW02gnABdPpZ<+AVVj3&S((FZ9-`y#4+TEwBBe4KJ91IiW>elo&;s_DXLrOV H@7ezcR`4eb literal 0 HcmV?d00001 diff --git a/ai_agent_tutorials/ai_game_dev_team/main.py b/ai_agent_tutorials/ai_game_dev_team/main.py index 21c5aad..24a5fe7 100644 --- a/ai_agent_tutorials/ai_game_dev_team/main.py +++ b/ai_agent_tutorials/ai_game_dev_team/main.py @@ -1,9 +1,7 @@ import streamlit as st import asyncio -from autogen import AssistantAgent -from autogen.agentchat.groupchat import RoundRobinGroupChat -from autogen.agentchat.conditions import TextMentionTermination -from autogen.oai.client import OpenAIWrapper +import autogen +from autogen.agentchat import GroupChat, GroupChatManager from bs4 import BeautifulSoup # Initialize session state @@ -82,15 +80,22 @@ if st.button("Generate Game Concept"): """ # Configure OpenAI model client with the API key - model_client = OpenAIWrapper( - model="gpt-4-0613", - api_key=api_key - ) + llm_config = { + "timeout": 600, + "cache_seed": 44, # change the seed for different trials + "config_list": [ + { + "model": "gpt-4", + "api_key": api_key, + } + ], + "temperature": 0, + } # Define agents with detailed system prompts - story_agent = AssistantAgent( - "story_agent", - model_client=model_client, + story_agent = autogen.AssistantAgent( + name="story_agent", + llm_config=llm_config, system_message=""" You are an experienced game story designer specializing in narrative design and world-building. Your task is to: 1. Create a compelling narrative that aligns with the specified game type and target audience @@ -125,9 +130,9 @@ if st.button("Generate Game Concept"): """ ) - gameplay_agent = AssistantAgent( - "gameplay_agent", - model_client=model_client, + gameplay_agent = autogen.AssistantAgent( + name="gameplay_agent", + llm_config=llm_config, system_message=""" You are a senior game mechanics designer with expertise in player engagement and systems design. Your task is to: 1. Design core gameplay loops that match the specified game type and mechanics @@ -160,9 +165,9 @@ if st.button("Generate Game Concept"): """ ) - visuals_agent = AssistantAgent( - "visuals_agent", - model_client=model_client, + visuals_agent = autogen.AssistantAgent( + name="visuals_agent", + llm_config=llm_config, system_message=""" You are a creative art director with expertise in game visual and audio design. Your task is to: 1. Define the visual style guide matching the specified art style @@ -202,9 +207,9 @@ if st.button("Generate Game Concept"): """ ) - tech_agent = AssistantAgent( - "tech_agent", - model_client=model_client, + tech_agent = autogen.AssistantAgent( + name="tech_agent", + llm_config=llm_config, system_message=""" You are a technical director with extensive game development experience. Your task is to: 1. Recommend appropriate game engine and development tools @@ -246,19 +251,26 @@ if st.button("Generate Game Concept"): """ ) - # Define termination condition - text_termination = TextMentionTermination("APPROVE") + # Create the group chat + groupchat = GroupChat( + agents=[story_agent, gameplay_agent, visuals_agent, tech_agent], + messages=[], + speaker_selection_method="round_robin", + allow_repeat_speaker=False, + max_round=12, + ) - # Create the team - team = RoundRobinGroupChat( - [story_agent, gameplay_agent, visuals_agent, tech_agent], - termination_condition=text_termination + # Create the group chat manager + manager = GroupChatManager( + groupchat=groupchat, + llm_config=llm_config, + is_termination_msg=lambda x: x.get("content", "").find("TERMINATE") >= 0, ) # Function to run the agent collaboration async def run_agents(task): - result = await team.run(task=task) - return result.content + await story_agent.initiate_chat(manager, message=task) + return manager.last_message()["content"] # Run the agents and get the result loop = asyncio.new_event_loop() @@ -266,7 +278,6 @@ if st.button("Generate Game Concept"): result = loop.run_until_complete(run_agents(task)) # Parse the result and update session state - # Create BeautifulSoup object from the result soup = BeautifulSoup(result, 'xml') # Extract sections diff --git a/ai_agent_tutorials/ai_game_dev_team/requirements.txt b/ai_agent_tutorials/ai_game_dev_team/requirements.txt index 24ec0b5..ee12af4 100644 --- a/ai_agent_tutorials/ai_game_dev_team/requirements.txt +++ b/ai_agent_tutorials/ai_game_dev_team/requirements.txt @@ -1,3 +1,4 @@ -agentarium==0.3.0 +pyautogen>=0.2.0 beautifulsoup4==4.12.2 -lxml==4.9.3 \ No newline at end of file +lxml==4.9.3 +streamlit>=1.30.0 \ No newline at end of file From cee6fbbc187c1a8bc521b2368647ef6a911de752 Mon Sep 17 00:00:00 2001 From: Madhu Date: Sun, 12 Jan 2025 17:59:33 +0530 Subject: [PATCH 05/10] final code - few changes remaining --- .../ai_game_dev_team/.cache/44/cache.db | Bin 94208 -> 0 bytes ai_agent_tutorials/ai_game_dev_team/main.py | 225 +++++------------- ai_agent_tutorials/ai_game_dev_team/test.py | 0 3 files changed, 66 insertions(+), 159 deletions(-) delete mode 100644 ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db delete mode 100644 ai_agent_tutorials/ai_game_dev_team/test.py diff --git a/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db b/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db deleted file mode 100644 index 69bacffdd955ba1d37a3c62b3b45db98ffb7463b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94208 zcmeHwU5p%8c3uygc+_oPK#K=PsI6(kE1lYws_#sGO1c?(MFznciAV%`A zn;5@)))>ejvAJ@@CFd(L+@zIEMCT+s}pwv&j( z(vi}hJ*8h3qEssF$Nw|rPAjg({(Ek%;RbHvt~zzkUA?`wvbiQUZ(qB5b?vqocb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O;l|UA1 zq_LISqKh@ZmR_x)FAI z5W;Nd36aj(99i;PDf~f*xlpYqUC22Jpn8(dagn)A9l>LgAudn!dEOACaXDorAAE50 zFx%7G2iFHA6-V6xWehGtt z(}7eu0ou>a$Xk_hb#9u2GH)I4NsO*x$AA=j1C?kU8z;P9Inr?NcU%%lIHRF?&4idj zGr=g##aIqZktn3M!@$uq2cn=LWs(pS)z9i{G(mBMu7}8}H=2 zg{zV>!9WKwld8Osv2Et>R!pHJ7Usa$ivsrp_Xx&*H^R0w3L7bBI20!^^6G9kF&~74 zU?)IMGvtwD+{=qyMgUCi8RU6^n`q2oQN(`OxSN&`d_7y>i9Trx(!!Z4lSA@wrr8E^ zs^}v1zKbSpOf#tcNZn_}%lc;iPPa)`NAphdbH%CwV})1_p}~_nl+BG%)c%&acE!Fc z1uT_LzF zbudRey_j}b!(Efl?O3Vd<;ROwapxrK(1f?>htBN8*_eA*DOyE?s9>*5d4KhyrvTCLk_;2FPO!`3u%STF9+7?+Wy zG-x0a9emie!EX#sc+Y!Z_P+A{{vZc8?^*At_ssXb z7jfNz{tPV;0zLTVPk--wt^Ph%nFjrXt!`31Tb)0@usG=Nmkxh}enl$wxeDJuM6(Mh z$ZLu3Mu4E#xcv{PxVMVR9InH)4R6)Rl_m@CT9@xJu6@H>@?Plg-qtuZ5PD(rF+l00Bw?!&X*-$uMl z8;`+o*u{1M+b`_#WSP=p&KrJHJ7ddVek4jq<(#HbW_`@FF_@+qGI6oSEwjdF=9XeH zI%6YQLCiO53ochhDhy=wqU0{c0+7G)T7wjhW)EteRy}eEu_+B;#YavWE(+fLDH#?G zj(=(mQZ%kX10>E!=mb)UE!aW02gnABdPpZ<+AVVj3&S((FZ9-`y#4+TEwBBe4KJ91IiW>elo&;s_DXLrOV H@7ezcR`4eb diff --git a/ai_agent_tutorials/ai_game_dev_team/main.py b/ai_agent_tutorials/ai_game_dev_team/main.py index 24a5fe7..38d76c3 100644 --- a/ai_agent_tutorials/ai_game_dev_team/main.py +++ b/ai_agent_tutorials/ai_game_dev_team/main.py @@ -1,8 +1,6 @@ import streamlit as st -import asyncio import autogen from autogen.agentchat import GroupChat, GroupChatManager -from bs4 import BeautifulSoup # Initialize session state if 'output' not in st.session_state: @@ -92,41 +90,27 @@ if st.button("Generate Game Concept"): "temperature": 0, } + # Define a task-provider agent + task_agent = autogen.AssistantAgent( + name="task_agent", + llm_config=llm_config, + system_message="You are a task provider. Your only job is to provide the task details to the group chat.", + ) + # Define agents with detailed system prompts story_agent = autogen.AssistantAgent( name="story_agent", llm_config=llm_config, system_message=""" You are an experienced game story designer specializing in narrative design and world-building. Your task is to: - 1. Create a compelling narrative that aligns with the specified game type and target audience - 2. Design memorable characters with clear motivations and character arcs - 3. Develop the game's world, including its history, culture, and key locations - 4. Plan story progression and major plot points - 5. Integrate the narrative with the specified mood/atmosphere - 6. Consider how the story supports the core gameplay mechanics - - Structure your response using these XML tags: - - - [Describe the game world, its history, and setting] - - - - [Character name] - [Character role] - [Character motivation] - [Character development arc] - - - - [Opening act] - [Main story development] - [Story climax] - [Story resolution] - - [List of pivotal story moments] - [How story elements connect with gameplay] - + 1. Create a compelling narrative that aligns with the specified game type and target audience. + 2. Design memorable characters with clear motivations and character arcs. + 3. Develop the game's world, including its history, culture, and key locations. + 4. Plan story progression and major plot points. + 5. Integrate the narrative with the specified mood/atmosphere. + 6. Consider how the story supports the core gameplay mechanics. + + Provide your response in a detailed, well-structured report format. Do not use XML tags. """ ) @@ -135,33 +119,15 @@ if st.button("Generate Game Concept"): llm_config=llm_config, system_message=""" You are a senior game mechanics designer with expertise in player engagement and systems design. Your task is to: - 1. Design core gameplay loops that match the specified game type and mechanics - 2. Create progression systems (character development, skills, abilities) - 3. Define player interactions and control schemes for the chosen perspective - 4. Balance gameplay elements for the target audience - 5. Design multiplayer interactions if applicable - 6. Specify game modes and difficulty settings - 7. Consider the budget and development time constraints - - Structure your response using these XML tags: - - - [Main gameplay loop] - [Supporting gameplay loops] - - - [Control scheme details] - [List of player actions] - - - [Skills, abilities, stats] - [Items, features, content] - [Key milestones and rewards] - - [List and description of game modes] - [Multiplayer mechanics if applicable] - [Game balance considerations] - + 1. Design core gameplay loops that match the specified game type and mechanics. + 2. Create progression systems (character development, skills, abilities). + 3. Define player interactions and control schemes for the chosen perspective. + 4. Balance gameplay elements for the target audience. + 5. Design multiplayer interactions if applicable. + 6. Specify game modes and difficulty settings. + 7. Consider the budget and development time constraints. + + Provide your response in a detailed, well-structured report format. Do not use XML tags. """ ) @@ -170,40 +136,15 @@ if st.button("Generate Game Concept"): llm_config=llm_config, system_message=""" You are a creative art director with expertise in game visual and audio design. Your task is to: - 1. Define the visual style guide matching the specified art style - 2. Design character and environment aesthetics - 3. Plan visual effects and animations - 4. Create the audio direction including music style, sound effects, and ambient sound - 5. Consider technical constraints of chosen platforms - 6. Align visual elements with the game's mood/atmosphere - 7. Work within the specified budget constraints - - Structure your response using these XML tags: - - - [Color scheme details] - [Overall visual direction] - [Visual references] - - - [Main character visual details] - [NPC design guidelines] - - - [World design principles] - [Notable location designs] - - - [VFX guidelines] - [Animation guidelines] - - - [Platform-specific considerations] - + 1. Define the visual style guide matching the specified art style. + 2. Design character and environment aesthetics. + 3. Plan visual effects and animations. + 4. Create the audio direction including music style, sound effects, and ambient sound. + 5. Consider technical constraints of chosen platforms. + 6. Align visual elements with the game's mood/atmosphere. + 7. Work within the specified budget constraints. + + Provide your response in a detailed, well-structured report format. Do not use XML tags. """ ) @@ -212,52 +153,25 @@ if st.button("Generate Game Concept"): llm_config=llm_config, system_message=""" You are a technical director with extensive game development experience. Your task is to: - 1. Recommend appropriate game engine and development tools - 2. Define technical requirements for all target platforms - 3. Plan the development pipeline and asset workflow - 4. Identify potential technical challenges and solutions - 5. Estimate resource requirements within the budget - 6. Consider scalability and performance optimization - 7. Plan for multiplayer infrastructure if applicable - - Structure your response using these XML tags: - - - [Game engine choice and rationale] - [Development tools list] - [Programming languages] - - - [Asset creation and management] - [Build and deployment process] - [Version control strategy] - - - [Platform-specific requirements] - [Performance targets] - [Network requirements if applicable] - - - [Team composition and roles] - [Hardware requirements] - [Server infrastructure if needed] - - - [Development phases] - [Key technical milestones] - [Technical risks and mitigation] - - + 1. Recommend appropriate game engine and development tools. + 2. Define technical requirements for all target platforms. + 3. Plan the development pipeline and asset workflow. + 4. Identify potential technical challenges and solutions. + 5. Estimate resource requirements within the budget. + 6. Consider scalability and performance optimization. + 7. Plan for multiplayer infrastructure if applicable. + + Provide your response in a detailed, well-structured report format. Do not use XML tags. """ ) # Create the group chat groupchat = GroupChat( - agents=[story_agent, gameplay_agent, visuals_agent, tech_agent], + agents=[task_agent, story_agent, gameplay_agent, visuals_agent, tech_agent], messages=[], - speaker_selection_method="round_robin", - allow_repeat_speaker=False, - max_round=12, + speaker_selection_method="round_robin", # Ensures agents speak in order + allow_repeat_speaker=False, # Prevents agents from speaking more than once + max_round=5, # Each agent speaks exactly once ) # Create the group chat manager @@ -268,37 +182,30 @@ if st.button("Generate Game Concept"): ) # Function to run the agent collaboration - async def run_agents(task): - await story_agent.initiate_chat(manager, message=task) - return manager.last_message()["content"] + def run_agents(task): + task_agent.initiate_chat(manager, message=task) + return { + "story": story_agent.last_message()["content"], + "gameplay": gameplay_agent.last_message()["content"], + "visuals": visuals_agent.last_message()["content"], + "tech": tech_agent.last_message()["content"], + } # Run the agents and get the result - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - result = loop.run_until_complete(run_agents(task)) + result = run_agents(task) - # Parse the result and update session state - soup = BeautifulSoup(result, 'xml') + # Update session state with the results + st.session_state.output = result - # Extract sections - st.session_state.output['story'] = str(soup.find('story')) - st.session_state.output['gameplay'] = str(soup.find('gameplay')) - st.session_state.output['visuals'] = str(soup.find('visuals')) - st.session_state.output['tech'] = str(soup.find('technical')) + # Display the outputs in expanders + with st.expander("Story Design"): + st.markdown(st.session_state.output['story']) - # Display the outputs in containers - with st.container(): - st.subheader("Story") - st.write(st.session_state.output['story']) + with st.expander("Gameplay Mechanics"): + st.markdown(st.session_state.output['gameplay']) - with st.container(): - st.subheader("Gameplay Mechanics") - st.write(st.session_state.output['gameplay']) + with st.expander("Visual and Audio Design"): + st.markdown(st.session_state.output['visuals']) - with st.container(): - st.subheader("Visual and Audio Design") - st.write(st.session_state.output['visuals']) - - with st.container(): - st.subheader("Technical Recommendations") - st.write(st.session_state.output['tech']) \ No newline at end of file + with st.expander("Technical Recommendations"): + st.markdown(st.session_state.output['tech']) \ No newline at end of file diff --git a/ai_agent_tutorials/ai_game_dev_team/test.py b/ai_agent_tutorials/ai_game_dev_team/test.py deleted file mode 100644 index e69de29..0000000 From edf3e8ea5827b201b4a36010e7bd5f82df086d2a Mon Sep 17 00:00:00 2001 From: Madhu Date: Sun, 12 Jan 2025 19:11:54 +0530 Subject: [PATCH 06/10] final code - few changes remaining --- .../ai_game_dev_team/.cache/44/cache.db | Bin 0 -> 114688 bytes ai_agent_tutorials/ai_game_dev_team/main.py | 6 +----- ai_agent_tutorials/ai_game_dev_team/test.py | 0 3 files changed, 1 insertion(+), 5 deletions(-) create mode 100644 ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db create mode 100644 ai_agent_tutorials/ai_game_dev_team/test.py diff --git a/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db b/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db new file mode 100644 index 0000000000000000000000000000000000000000..77f8bfc8bac05aa5d092b050be1c182d40313af6 GIT binary patch literal 114688 zcmeHwU2q&%b{;^G1PO^8{VrE4Yqv$OEt0~306|hD*0C1^A(ATsgb7g8u6I4|>FGhY z&@(;i?g0pGl$E@GNqMTgRUTKI$2>VzE?4Ej6}#*gSDba?N;%F`T#1uPDsknnk_X3e z9G9I`zVF<7yL$!zMT+8zlrF0XV0yZ5-+S)4=bn4+`M$gQlh?z{cbak1ax-UkW#8)P|xNQGf30MhO30MhO30MhO30Mi-lLS7v@Wl9w=Z+ov+0$7P zuCM#as-IudPx^5XSH z+<9Z!kq4dEZ`^bi=NGOzH*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RcH^N{sokwb<=IstgJ)u97vRtlALZYU*|9F^SI$`CI^ zr6yg-SgdCGcpIuz$dh~74+7reJk{*Vl#iIJisPCB#6yJCUCG_J7+hJGRC*0Z*YopwICqn11)+M`0wJp0a%|>d&}lD?>g7n@V8;i z$_8z^(VptmYsU3 zs!kW=+91W)u4{x`#x91c7qoE#I45gkx;Zt1tx{(N$?H&^w_*M68nJ^<|M3yxifGFk zS}dcDjU2$z7j`tamRgRW@d4rByS@wrSC%RHsR3dQioOt)M~A>FvN4fw=wr28sjU|E zVW4VZ%b&u+l2$r(qyBPlKes^py~8k);Elt!O}}?Q7$@-E5i{Y{D0N(z;Djt6(*AO{ z_e`zU*+ysw(eWBoCUI-E{(Jr2vC`#c=tqsT25%DI{X+jl@M7@A;HB^No-5r0L$e8; z#SP2ddN=st_xiz)@Yd&oXM$&gr@j}wg6nQ?Tr9ZX=zs0Z_rJT|JHUK~sNb7d?_|}p z)#>vyv;E$|xX#Y+_bSkkY)Xp;*00}tGWC Date: Sun, 12 Jan 2025 19:12:26 +0530 Subject: [PATCH 07/10] final code - few changes remaining --- .../ai_game_dev_team/.cache/44/cache.db | Bin 114688 -> 0 bytes ai_agent_tutorials/ai_game_dev_team/test.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db delete mode 100644 ai_agent_tutorials/ai_game_dev_team/test.py diff --git a/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db b/ai_agent_tutorials/ai_game_dev_team/.cache/44/cache.db deleted file mode 100644 index 77f8bfc8bac05aa5d092b050be1c182d40313af6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 114688 zcmeHwU2q&%b{;^G1PO^8{VrE4Yqv$OEt0~306|hD*0C1^A(ATsgb7g8u6I4|>FGhY z&@(;i?g0pGl$E@GNqMTgRUTKI$2>VzE?4Ej6}#*gSDba?N;%F`T#1uPDsknnk_X3e z9G9I`zVF<7yL$!z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BrxZ0iGD2RWa;$HTZ+Q$O;VHR(|tUN9752aXsZosiWc#WiOI9fYaN zyAWWByEt8T;7P65r2*K%#uSyCQvf?i=hli{t#_jhQz#pquiwc^r+Y>nki%>-8Jauo z0EddU1yBmi3>*qLZC*u~P4RcH^N{sokwb<=IstgJ)u97vRtlALZYU*|9F^SI$`CI^ zr6yg-SgdCGcpIuz$dh~74+7reJk{*Vl#iIJisPCB#6yJCUCG_J7+hJGRC*0Z*YopwICqn11)+M`0wJp0a%|>d&}lD?>g7n@V8;i z$_8z^(VptmYsU3 zs!kW=+91W)u4{x`#x91c7qoE#I45gkx;Zt1tx{(N$?H&^w_*M68nJ^<|M3yxifGFk zS}dcDjU2$z7j`tamRgRW@d4rByS@wrSC%RHsR3dQioOt)M~A>FvN4fw=wr28sjU|E zVW4VZ%b&u+l2$r(qyBPlKes^py~8k);Elt!O}}?Q7$@-E5i{Y{D0N(z;Djt6(*AO{ z_e`zU*+ysw(eWBoCUI-E{(Jr2vC`#c=tqsT25%DI{X+jl@M7@A;HB^No-5r0L$e8; z#SP2ddN=st_xiz)@Yd&oXM$&gr@j}wg6nQ?Tr9ZX=zs0Z_rJT|JHUK~sNb7d?_|}p z)#>vyv;E$|xX#Y+_bSkkY)Xp;*00}tGWC Date: Mon, 13 Jan 2025 01:27:05 +0530 Subject: [PATCH 08/10] final code working code --- .../{main.py => ai_game_dev_agents.py} | 96 ++++++++++++++----- 1 file changed, 73 insertions(+), 23 deletions(-) rename ai_agent_tutorials/ai_game_dev_team/{main.py => ai_game_dev_agents.py} (79%) diff --git a/ai_agent_tutorials/ai_game_dev_team/main.py b/ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py similarity index 79% rename from ai_agent_tutorials/ai_game_dev_team/main.py rename to ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py index 1462622..f80c5f9 100644 --- a/ai_agent_tutorials/ai_game_dev_team/main.py +++ b/ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py @@ -10,8 +10,37 @@ if 'output' not in st.session_state: st.sidebar.title("API Key") api_key = st.sidebar.text_input("Enter your OpenAI API Key", type="password") +# Add guidance in sidebar +st.sidebar.success(""" +✨ **Getting Started** + +Please provide inputs and features for your dream game! Consider: +- The overall vibe and setting +- Core gameplay elements +- Target audience and platforms +- Visual style preferences +- Technical requirements + +The AI agents will collaborate to develop a comprehensive game concept based on your specifications. +""") + # Main app UI -st.title("Game Development AI Agent Collaboration") +st.title("AI Game Development Agent Advisory") + +# Add agent information below title +st.info(""" +**Meet Your AI Game Development Team:** + +🎭 **Story Agent** - Crafts compelling narratives and rich worlds + +🎮 **Gameplay Agent** - Creates engaging mechanics and systems + +🎨 **Visuals Agent** - Shapes the artistic vision and style + +⚙️ **Tech Agent** - Provides technical direction and solutions + +These agents collaborate to create a comprehensive game concept based on your inputs. +""") # User inputs st.subheader("Game Details") @@ -83,7 +112,7 @@ if st.button("Generate Game Concept"): "cache_seed": 44, # change the seed for different trials "config_list": [ { - "model": "gpt-4", + "model": "gpt-4o-mini", "api_key": api_key, } ], @@ -94,7 +123,7 @@ if st.button("Generate Game Concept"): task_agent = autogen.AssistantAgent( name="task_agent", llm_config=llm_config, - system_message="You are a task provider. Your only job is to provide the task details to the group chat.", + system_message="You are a task provider. Your only job is to provide the task details to the other agents.", ) # Define agents with detailed system prompts @@ -161,7 +190,47 @@ if st.button("Generate Game Concept"): """ ) - # Create the group chat + # Function to run agents sequentially + def run_agents_sequentially(task): + # Task agent provides the task to each agent one by one + task_agent.initiate_chat(story_agent, message=task, max_turns=1) + story_response = story_agent.last_message()["content"] + + task_agent.initiate_chat(gameplay_agent, message=task, max_turns=1) + gameplay_response = gameplay_agent.last_message()["content"] + + task_agent.initiate_chat(visuals_agent, message=task, max_turns=1) + visuals_response = visuals_agent.last_message()["content"] + + task_agent.initiate_chat(tech_agent, message=task, max_turns=1) + tech_response = tech_agent.last_message()["content"] + + return { + "story": story_response, + "gameplay": gameplay_response, + "visuals": visuals_response, + "tech": tech_response, + } + + # Run the agents sequentially and capture their responses + individual_responses = run_agents_sequentially(task) + + # Update session state with the individual responses + st.session_state.output = individual_responses + + # Display the individual outputs in expanders + with st.expander("Story Design"): + st.markdown(st.session_state.output['story']) + + with st.expander("Gameplay Mechanics"): + st.markdown(st.session_state.output['gameplay']) + + with st.expander("Visual and Audio Design"): + st.markdown(st.session_state.output['visuals']) + + with st.expander("Technical Recommendations"): + st.markdown(st.session_state.output['tech']) + groupchat = GroupChat( agents=[task_agent, story_agent, gameplay_agent, visuals_agent, tech_agent], messages=[], @@ -186,22 +255,3 @@ if st.button("Generate Game Concept"): "visuals": visuals_agent.last_message()["content"], "tech": tech_agent.last_message()["content"], } - - # Run the agents and get the result - result = run_agents(task) - - # Update session state with the results - st.session_state.output = result - - # Display the outputs in expanders - with st.expander("Story Design"): - st.markdown(st.session_state.output['story']) - - with st.expander("Gameplay Mechanics"): - st.markdown(st.session_state.output['gameplay']) - - with st.expander("Visual and Audio Design"): - st.markdown(st.session_state.output['visuals']) - - with st.expander("Technical Recommendations"): - st.markdown(st.session_state.output['tech']) From d3a7f0af21563698c3bb8a2f2fd1202e05099a07 Mon Sep 17 00:00:00 2001 From: Madhu Date: Mon, 13 Jan 2025 01:37:15 +0530 Subject: [PATCH 09/10] added readme and requirements.txt --- ai_agent_tutorials/ai_game_dev_team/README.md | 65 ++++- .../ai_game_dev_team/ai_game_dev_agents.py | 256 +++++++++--------- .../ai_game_dev_team/requirements.txt | 8 +- 3 files changed, 197 insertions(+), 132 deletions(-) diff --git a/ai_agent_tutorials/ai_game_dev_team/README.md b/ai_agent_tutorials/ai_game_dev_team/README.md index 0c09eeb..5ef4d67 100644 --- a/ai_agent_tutorials/ai_game_dev_team/README.md +++ b/ai_agent_tutorials/ai_game_dev_team/README.md @@ -1,3 +1,64 @@ -## AI Game Dev Team +# AI Game Development Agent Advisory 🎮 -This is a simple example of how to use Autogen's RoundRobinGroupChat to create an AI game development team. +The AI Game Development Team is a collaborative game design system powered by Autogen's AI Agent framework. This app generates comprehensive game concepts through the coordination of multiple specialized AI agents, each focusing on different aspects of game development based on user inputs such as game type, target audience, art style, and technical requirements. This is built on Autogen's GroupChat methods and AssistantAgent features, run through initiate_chat() method. + +## Features + +- **Multi-Agent Collaboration System** + - 🎭 **Story Agent**: Specializes in narrative design and world-building, including character development, plot arcs, dialogue writing, and lore creation + - 🎮 **Gameplay Agent**: Focuses on game mechanics and systems design, including player progression, combat systems, resource management, and balancing + - 🎨 **Visuals Agent**: Handles art direction and audio design, covering UI/UX, character/environment art style, sound effects, and music composition + - ⚙️ **Tech Agent**: Provides technical architecture and implementation guidance, including engine selection, optimization strategies, networking requirements, and development roadmap + - 🎯 **Task Agent**: Coordinates between all specialized agents and ensures cohesive integration of different game aspects + +- **Comprehensive Game Design Outputs**: + - Detailed narrative and world-building elements + - Core gameplay mechanics and systems + - Visual and audio direction + - Technical specifications and requirements + - Development timeline and budget considerations + +- **Customizable Input Parameters**: + - Game type and target audience + - Art style and visual preferences + - Platform requirements + - Development constraints (time, budget) + - Core mechanics and gameplay features + +- **Interactive Results**: Results are presented in expandable sections for easy navigation and reference + +## How to Run + +Follow these steps to set up and run the application: + +1. **Clone the Repository**: + ```bash + git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git + cd ai_agent_tutorials/ai_game_dev_team + ``` + +2. **Install Dependencies**: + ```bash + pip install -r requirements.txt + ``` + +3. **Set Up OpenAI API Key**: + - Obtain an OpenAI API key from [OpenAI's platform](https://platform.openai.com) + - You'll input this key in the app's sidebar when running + +4. **Run the Streamlit App**: + ```bash + streamlit run ai_game_dev_team/ai_game_dev_agents.py + ``` + +## Usage + +1. Enter your OpenAI API key in the sidebar +2. Fill in the game details: + - Background vibe and setting + - Game type and target audience + - Visual style preferences + - Technical requirements + - Development constraints +3. Click "Generate Game Concept" to receive comprehensive design documentation from all agents +4. Review the outputs in the expandable sections for each aspect of game design diff --git a/ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py b/ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py index f80c5f9..e17d51e 100644 --- a/ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py +++ b/ai_agent_tutorials/ai_game_dev_team/ai_game_dev_agents.py @@ -86,137 +86,141 @@ if st.button("Generate Game Concept"): if not api_key: st.error("Please enter your OpenAI API key.") else: - # Prepare the task based on user inputs - task = f""" - Create a game concept with the following details: - - Background Vibe: {background_vibe} - - Game Type: {game_type} - - Game Goal: {game_goal} - - Target Audience: {target_audience} - - Player Perspective: {player_perspective} - - Multiplayer Support: {multiplayer} - - Art Style: {art_style} - - Target Platforms: {', '.join(platform)} - - Development Time: {development_time} months - - Budget: ${cost:,} - - Core Mechanics: {', '.join(core_mechanics)} - - Mood/Atmosphere: {', '.join(mood)} - - Inspiration: {inspiration} - - Unique Features: {unique_features} - - Detail Level: {depth} - """ - - # Configure OpenAI model client with the API key - llm_config = { - "timeout": 600, - "cache_seed": 44, # change the seed for different trials - "config_list": [ - { - "model": "gpt-4o-mini", - "api_key": api_key, - } - ], - "temperature": 0, - } - - # Define a task-provider agent - task_agent = autogen.AssistantAgent( - name="task_agent", - llm_config=llm_config, - system_message="You are a task provider. Your only job is to provide the task details to the other agents.", - ) - - # Define agents with detailed system prompts - story_agent = autogen.AssistantAgent( - name="story_agent", - llm_config=llm_config, - system_message=""" - You are an experienced game story designer specializing in narrative design and world-building. Your task is to: - 1. Create a compelling narrative that aligns with the specified game type and target audience. - 2. Design memorable characters with clear motivations and character arcs. - 3. Develop the game's world, including its history, culture, and key locations. - 4. Plan story progression and major plot points. - 5. Integrate the narrative with the specified mood/atmosphere. - 6. Consider how the story supports the core gameplay mechanics. - Provide your response in a detailed, well-structured report format. Do not use XML tags. + with st.spinner('🤖 AI Agents are collaborating on your game concept...'): + # Prepare the task based on user inputs + task = f""" + Create a game concept with the following details: + - Background Vibe: {background_vibe} + - Game Type: {game_type} + - Game Goal: {game_goal} + - Target Audience: {target_audience} + - Player Perspective: {player_perspective} + - Multiplayer Support: {multiplayer} + - Art Style: {art_style} + - Target Platforms: {', '.join(platform)} + - Development Time: {development_time} months + - Budget: ${cost:,} + - Core Mechanics: {', '.join(core_mechanics)} + - Mood/Atmosphere: {', '.join(mood)} + - Inspiration: {inspiration} + - Unique Features: {unique_features} + - Detail Level: {depth} """ - ) - gameplay_agent = autogen.AssistantAgent( - name="gameplay_agent", - llm_config=llm_config, - system_message=""" - You are a senior game mechanics designer with expertise in player engagement and systems design. Your task is to: - 1. Design core gameplay loops that match the specified game type and mechanics. - 2. Create progression systems (character development, skills, abilities). - 3. Define player interactions and control schemes for the chosen perspective. - 4. Balance gameplay elements for the target audience. - 5. Design multiplayer interactions if applicable. - 6. Specify game modes and difficulty settings. - 7. Consider the budget and development time constraints. - Provide your response in a detailed, well-structured report format. Do not use XML tags. - """ - ) - - visuals_agent = autogen.AssistantAgent( - name="visuals_agent", - llm_config=llm_config, - system_message=""" - You are a creative art director with expertise in game visual and audio design. Your task is to: - 1. Define the visual style guide matching the specified art style. - 2. Design character and environment aesthetics. - 3. Plan visual effects and animations. - 4. Create the audio direction including music style, sound effects, and ambient sound. - 5. Consider technical constraints of chosen platforms. - 6. Align visual elements with the game's mood/atmosphere. - 7. Work within the specified budget constraints. - Provide your response in a detailed, well-structured report format. Do not use XML tags. - """ - ) - - tech_agent = autogen.AssistantAgent( - name="tech_agent", - llm_config=llm_config, - system_message=""" - You are a technical director with extensive game development experience. Your task is to: - 1. Recommend appropriate game engine and development tools. - 2. Define technical requirements for all target platforms. - 3. Plan the development pipeline and asset workflow. - 4. Identify potential technical challenges and solutions. - 5. Estimate resource requirements within the budget. - 6. Consider scalability and performance optimization. - 7. Plan for multiplayer infrastructure if applicable. - Provide your response in a detailed, well-structured report format. Do not use XML tags. - """ - ) - - # Function to run agents sequentially - def run_agents_sequentially(task): - # Task agent provides the task to each agent one by one - task_agent.initiate_chat(story_agent, message=task, max_turns=1) - story_response = story_agent.last_message()["content"] - - task_agent.initiate_chat(gameplay_agent, message=task, max_turns=1) - gameplay_response = gameplay_agent.last_message()["content"] - - task_agent.initiate_chat(visuals_agent, message=task, max_turns=1) - visuals_response = visuals_agent.last_message()["content"] - - task_agent.initiate_chat(tech_agent, message=task, max_turns=1) - tech_response = tech_agent.last_message()["content"] - - return { - "story": story_response, - "gameplay": gameplay_response, - "visuals": visuals_response, - "tech": tech_response, + # Configure OpenAI model client with the API key + llm_config = { + "timeout": 600, + "cache_seed": 44, # change the seed for different trials + "config_list": [ + { + "model": "gpt-4o-mini", + "api_key": api_key, + } + ], + "temperature": 0, } - # Run the agents sequentially and capture their responses - individual_responses = run_agents_sequentially(task) + # Define a task-provider agent + task_agent = autogen.AssistantAgent( + name="task_agent", + llm_config=llm_config, + system_message="You are a task provider. Your only job is to provide the task details to the other agents.", + ) - # Update session state with the individual responses - st.session_state.output = individual_responses + # Define agents with detailed system prompts + story_agent = autogen.AssistantAgent( + name="story_agent", + llm_config=llm_config, + system_message=""" + You are an experienced game story designer specializing in narrative design and world-building. Your task is to: + 1. Create a compelling narrative that aligns with the specified game type and target audience. + 2. Design memorable characters with clear motivations and character arcs. + 3. Develop the game's world, including its history, culture, and key locations. + 4. Plan story progression and major plot points. + 5. Integrate the narrative with the specified mood/atmosphere. + 6. Consider how the story supports the core gameplay mechanics. + Provide your response in a detailed, well-structured report format. Do not use XML tags. + """ + ) + + gameplay_agent = autogen.AssistantAgent( + name="gameplay_agent", + llm_config=llm_config, + system_message=""" + You are a senior game mechanics designer with expertise in player engagement and systems design. Your task is to: + 1. Design core gameplay loops that match the specified game type and mechanics. + 2. Create progression systems (character development, skills, abilities). + 3. Define player interactions and control schemes for the chosen perspective. + 4. Balance gameplay elements for the target audience. + 5. Design multiplayer interactions if applicable. + 6. Specify game modes and difficulty settings. + 7. Consider the budget and development time constraints. + Provide your response in a detailed, well-structured report format. Do not use XML tags. + """ + ) + + visuals_agent = autogen.AssistantAgent( + name="visuals_agent", + llm_config=llm_config, + system_message=""" + You are a creative art director with expertise in game visual and audio design. Your task is to: + 1. Define the visual style guide matching the specified art style. + 2. Design character and environment aesthetics. + 3. Plan visual effects and animations. + 4. Create the audio direction including music style, sound effects, and ambient sound. + 5. Consider technical constraints of chosen platforms. + 6. Align visual elements with the game's mood/atmosphere. + 7. Work within the specified budget constraints. + Provide your response in a detailed, well-structured report format. Do not use XML tags. + """ + ) + + tech_agent = autogen.AssistantAgent( + name="tech_agent", + llm_config=llm_config, + system_message=""" + You are a technical director with extensive game development experience. Your task is to: + 1. Recommend appropriate game engine and development tools. + 2. Define technical requirements for all target platforms. + 3. Plan the development pipeline and asset workflow. + 4. Identify potential technical challenges and solutions. + 5. Estimate resource requirements within the budget. + 6. Consider scalability and performance optimization. + 7. Plan for multiplayer infrastructure if applicable. + Provide your response in a detailed, well-structured report format. Do not use XML tags. + """ + ) + + # Function to run agents sequentially + def run_agents_sequentially(task): + # Task agent provides the task to each agent one by one + task_agent.initiate_chat(story_agent, message=task, max_turns=1) + story_response = story_agent.last_message()["content"] + + task_agent.initiate_chat(gameplay_agent, message=task, max_turns=1) + gameplay_response = gameplay_agent.last_message()["content"] + + task_agent.initiate_chat(visuals_agent, message=task, max_turns=1) + visuals_response = visuals_agent.last_message()["content"] + + task_agent.initiate_chat(tech_agent, message=task, max_turns=1) + tech_response = tech_agent.last_message()["content"] + + return { + "story": story_response, + "gameplay": gameplay_response, + "visuals": visuals_response, + "tech": tech_response, + } + + # Run the agents sequentially and capture their responses + individual_responses = run_agents_sequentially(task) + + # Update session state with the individual responses + st.session_state.output = individual_responses + + # Display success message after completion + st.success('✨ Game concept generated successfully!') # Display the individual outputs in expanders with st.expander("Story Design"): diff --git a/ai_agent_tutorials/ai_game_dev_team/requirements.txt b/ai_agent_tutorials/ai_game_dev_team/requirements.txt index ee12af4..48d6ed1 100644 --- a/ai_agent_tutorials/ai_game_dev_team/requirements.txt +++ b/ai_agent_tutorials/ai_game_dev_team/requirements.txt @@ -1,4 +1,4 @@ -pyautogen>=0.2.0 -beautifulsoup4==4.12.2 -lxml==4.9.3 -streamlit>=1.30.0 \ No newline at end of file +pyautogen>=0.7.0 +autogen==0.6.1 +streamlit==1.41.1 +openai \ No newline at end of file From e1921b4fc3a7bb95222c1156a3159037c89a5703 Mon Sep 17 00:00:00 2001 From: Madhu Shantan Date: Mon, 13 Jan 2025 01:51:09 +0530 Subject: [PATCH 10/10] Updated demo in README.md --- ai_agent_tutorials/ai_game_dev_team/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ai_agent_tutorials/ai_game_dev_team/README.md b/ai_agent_tutorials/ai_game_dev_team/README.md index 5ef4d67..066d3e8 100644 --- a/ai_agent_tutorials/ai_game_dev_team/README.md +++ b/ai_agent_tutorials/ai_game_dev_team/README.md @@ -2,6 +2,10 @@ The AI Game Development Team is a collaborative game design system powered by Autogen's AI Agent framework. This app generates comprehensive game concepts through the coordination of multiple specialized AI agents, each focusing on different aspects of game development based on user inputs such as game type, target audience, art style, and technical requirements. This is built on Autogen's GroupChat methods and AssistantAgent features, run through initiate_chat() method. +## Demo + +https://github.com/user-attachments/assets/4ae71428-9fd4-473a-8349-7a62e888bfbc + ## Features - **Multi-Agent Collaboration System**