Skip to content

Commit

Permalink
Add a sample game planner.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Feb 19, 2024
1 parent 6c85acf commit 16f9cc4
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .gut_editor_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
"show_help": false,
"suffix": ".gd",
"tests": [],
"unit_test_name": null
"unit_test_name": "test_vr_community_planning"
}
148 changes: 109 additions & 39 deletions goal_task_tests/core_problems/test_game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,123 @@ var the_domain = preload("res://addons/task_goal/core/domain.gd").new(domain_nam

var planner = preload("res://addons/task_goal/core/plan.gd").new()

# Types used for validation if necessary
@export var types = {
"activity": [
"initialize_virtual_environment",
"design_avatar_customization_options",
"implement_communication_systems",
"create_social_gathering_areas",
"develop_mini_games",
"set_up_event_scheduling",
"integrate_user_content_sharing",
"establish_community_guidelines",
"launch_public_beta_test",
"collect_beta_feedback",
"improve_based_on_feedback",
"finalize_platform_polishing",
"prepare_marketing_campaign",
"conceptualize_platform",
"gather_requirements",
"create_project_roadmap",
"assemble_development_team",
"choose_technology_stack",
"design_system_architecture",
"prototype_interactive_elements",
"develop_user_interface_design",
"establish_security_protocols",
"build_core_functionality",
"code_networking_features",
"construct_virtual_worlds",
"animate_avatars_and_objects",
"compose_background_music",
"design_spatial_audio_effects",
"implement_voice_chat",
"code_text_chat_system",
"create_emote_system",
"integrate_third_party_services",
"develop_content_moderation_tools",
"set_up_user_account_system",
"configure_database_systems",
"optimize_performance",
"conduct_unit_testing",
"execute_integration_testing",
"perform_system_testing",
"ensure_compatibility_with_devices",
"develop_data_backup_solutions",
"plan_for_scalability",
"deploy_beta_version",
"train_support_staff",
"release_updates_and_patches",
"maintain_server_infrastructure",
"monitor_user_activity_trends",
"analyze_platform_metrics",
"gather_user_suggestions",
"improve_user_experience",
"expand_virtual_environments",
"enhance_avatar_customization",
"offer_new_social_features",
"promote_content_creator_tools",
"increase_platform_accessibility",
"collaborate_with_partners",
"celebrate_platform_anniversary",
"launch_full_platform",
"monitor_platform_stability",
"update_with_new_features",
"finish"
"optimize_cloud_services",
"facilitate_live_streaming_capabilities",
"introduce_advanced_AI_features",
"develop_global_leaderboards",
"enhance_community_interaction_tools",
"improve_asset_library",
"deploy_continuous_integration_system",
"establish_brand_guidelines",
"host_global_tournaments"
]
}

# Dependency graph for the activities
@export var dependencies: Dictionary = {
"initialize_virtual_environment": [],
"design_avatar_customization_options": ["initialize_virtual_environment"],
"implement_communication_systems": ["initialize_virtual_environment"],
"create_social_gathering_areas": ["implement_communication_systems"],
"develop_mini_games": ["create_social_gathering_areas", "design_avatar_customization_options"],
"set_up_event_scheduling": ["create_social_gathering_areas"],
"integrate_user_content_sharing": ["implement_communication_systems"],
"establish_community_guidelines": ["initialize_virtual_environment"],
"launch_public_beta_test": ["develop_mini_games", "establish_community_guidelines"],
"collect_beta_feedback": ["launch_public_beta_test"],
"improve_based_on_feedback": ["collect_beta_feedback"],
"finalize_platform_polishing": ["improve_based_on_feedback"],
"prepare_marketing_campaign": ["finalize_platform_polishing"],
"launch_full_platform": ["prepare_marketing_campaign"],
"monitor_platform_stability": ["launch_full_platform"],
"update_with_new_features": ["monitor_platform_stability"],
"finish": [
"update_with_new_features",
"launch_full_platform"
]
"conceptualize_platform": [],
"gather_requirements": ["conceptualize_platform"],
"create_project_roadmap": ["gather_requirements"],
"assemble_development_team": ["create_project_roadmap"],
"choose_technology_stack": ["assemble_development_team"],
"design_system_architecture": ["choose_technology_stack"],
"prototype_interactive_elements": ["design_system_architecture"],
"develop_user_interface_design": ["prototype_interactive_elements"],
"establish_security_protocols": ["design_system_architecture"],
"build_core_functionality": ["develop_user_interface_design", "establish_security_protocols"],
"code_networking_features": ["build_core_functionality"],
"construct_virtual_worlds": ["code_networking_features"],
"animate_avatars_and_objects": ["construct_virtual_worlds"],
"compose_background_music": ["animate_avatars_and_objects"],
"design_spatial_audio_effects": ["compose_background_music"],
"implement_voice_chat": ["code_networking_features"],
"code_text_chat_system": ["implement_voice_chat"],
"create_emote_system": ["code_text_chat_system"],
"integrate_third_party_services": ["build_core_functionality"],
"develop_content_moderation_tools": ["integrate_third_party_services"],
"set_up_user_account_system": ["develop_content_moderation_tools"],
"configure_database_systems": ["set_up_user_account_system"],
"optimize_performance": ["configure_database_systems", "build_core_functionality"],
"conduct_unit_testing": ["optimize_performance"],
"execute_integration_testing": ["conduct_unit_testing"],
"perform_system_testing": ["execute_integration_testing"],
"ensure_compatibility_with_devices": ["perform_system_testing"],
"develop_data_backup_solutions": ["configure_database_systems"],
"plan_for_scalability": ["develop_data_backup_solutions"],
"deploy_beta_version": ["plan_for_scalability", "perform_system_testing"],
"train_support_staff": ["deploy_beta_version"],
"release_updates_and_patches": ["train_support_staff"],
"maintain_server_infrastructure": ["release_updates_and_patches"],
"monitor_user_activity_trends": ["maintain_server_infrastructure"],
"analyze_platform_metrics": ["monitor_user_activity_trends"],
"gather_user_suggestions": ["analyze_platform_metrics"],
"improve_user_experience": ["gather_user_suggestions"],
"expand_virtual_environments": ["improve_user_experience"],
"enhance_avatar_customization": ["expand_virtual_environments"],
"offer_new_social_features": ["enhance_avatar_customization"],
"promote_content_creator_tools": ["offer_new_social_features"],
"increase_platform_accessibility": ["promote_content_creator_tools"],
"collaborate_with_partners": ["increase_platform_accessibility"],
"celebrate_platform_anniversary": ["launch_full_platform"],
"launch_full_platform": ["deploy_beta_version"],
"optimize_cloud_services": ["configure_database_systems"],
"facilitate_live_streaming_capabilities": ["build_core_functionality"],
"introduce_advanced_AI_features": ["design_system_architecture"],
"develop_global_leaderboards": ["code_networking_features"],
"enhance_community_interaction_tools": ["monitor_user_activity_trends"],
"improve_asset_library": ["build_core_functionality"],
"deploy_continuous_integration_system": ["conduct_unit_testing"],
"establish_brand_guidelines": ["conceptualize_platform"],
"host_global_tournaments": ["develop_global_leaderboards"]
}


# Prototypical initial state, can include current progress, resources etc.
var state0: Dictionary = {
# Example state properties
Expand Down Expand Up @@ -119,7 +189,7 @@ func test_vr_community_planning() -> void:

# Example: Executing a single activity
var state1 = state0.duplicate(true)
var goals = [["schedule_activity", "finish"]]
var goals = [["schedule_activity", "launch_full_platform"]]
var plan: Variant = planner.find_plan(state1, goals)

# Assert that plan is not false and has a positive size
Expand Down

0 comments on commit 16f9cc4

Please sign in to comment.