EG/plugins/user/swarm_intelligence/examples/basic_flock.py
2025-12-12 16:16:15 +08:00

28 lines
865 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
群体智能插件使用示例
"""
def basic_example():
"""
基础使用示例
"""
print("群体智能插件基础使用示例")
print("1. 启用插件后将自动创建一个包含20个成员的群体")
print("2. 群体成员会根据Boids算法进行移动")
print("3. 按F1键可以暂停/继续群体模拟")
print("4. 通过控制面板可以调节群体行为参数")
def advanced_example():
"""
高级使用示例
"""
print("群体智能插件高级使用示例")
print("1. 可以通过配置文件自定义群体参数")
print("2. 支持动态添加/删除群体成员")
print("3. 可以与场景中的其他对象进行交互")
print("4. 支持自定义群体行为规则")
if __name__ == "__main__":
basic_example()
print()
advanced_example()