From cee6fbbc187c1a8bc521b2368647ef6a911de752 Mon Sep 17 00:00:00 2001 From: Madhu Date: Sun, 12 Jan 2025 17:59:33 +0530 Subject: [PATCH] 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{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?^vuLPqg3~P*Efru98;`uk5R61_2lin`)6L9 znMjR-F@kH6bC2u3Uln?1{o1$gtO>Kq>b9)h6Sy!d@ZiZ`oh(nz%*;%Dubntsftr?R zZrZ0Orhl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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