dewi-kadita:基于熵诊断的理想化鱼群模拟Python库
dewi-kadita: A Python Library for Idealized Fish Schooling Simulation with Entropy-Based Diagnostics
February 8, 2026
作者: Sandy H. S. Herho, Iwan P. Anwar, Faruq Khadami, Alfita P. Handayani, Karina A. Sujatmiko, Kamaluddin Kasim, Rusmawan Suwarman, Dasapta E. Irawan
cs.AI
摘要
鱼群集体运动展现了活性物质系统中涌现的自组织现象,但当前用于模拟和分析这些动力学过程的计算工具仍分散于不同研究团队。我们推出dewi-kadita——一个开源Python库,该库实现了基于库津区域的三维模型,并配备了专为海洋集体行为研究定制的综合熵诊断工具。该库引入七种信息论度量指标(鱼群凝聚熵、极化熵、深度分层熵、角动量熵、最近邻熵、速度关联熵及鱼群形态熵),可表征经典序参数无法揭示的独特组织特征。这些指标融合成"海洋集群指数"(OSI),提供衡量集体无序性的单一标量值。在四种典型构型(集群态、环面态、动态平行态、高度平行态)中的验证表明:该库能准确复现已知相行为——集群态维持无序性(极化度P < 0.1,OSI约0.71),而高度平行态实现P=0.998且OSI=0.24,速度关联熵趋近于零。熵框架成功区分了序参数值相近但组织机制不同的环面态与动态平行态。通过Numba即时编译技术,成对相互作用计算速度提升10-100倍,可在标准工作站硬件上五分钟内完成150-250个智能体超过1000-2000步的模拟。NetCDF4输出格式确保了与海洋学分析工具的互操作性。该库填补了集体行为建模领域对标准化、可复现基础架构的需求,其意义堪比成熟的分子动力学代码。
English
Collective motion in fish schools exemplifies emergent self-organization in active matter systems, yet computational tools for simulating and analyzing these dynamics remain fragmented across research groups. We present dewi-kadita, an open-source Python library implementing the three-dimensional Couzin zone-based model with comprehensive entropy diagnostics tailored for marine collective behavior research. The library introduces seven information-theoretic metrics -- school cohesion entropy, polarization entropy, depth stratification entropy, angular momentum entropy, nearest-neighbor entropy, velocity correlation entropy, and school shape entropy -- that characterize distinct organizational features inaccessible to classical order parameters. These metrics combine into an Oceanic Schooling Index (OSI) providing a single scalar measure of collective disorder. Validation across four canonical configurations (swarm, torus, dynamic parallel, highly parallel) confirms correct reproduction of known phase behaviors: the swarm maintains disorder with polarization P < 0.1 and OSI approx 0.71, while the highly parallel state achieves P = 0.998 with OSI = 0.24 and velocity correlation entropy vanishing to zero. The entropy framework successfully discriminates the torus and dynamic parallel configurations that exhibit comparable order parameter magnitudes through different organizational mechanisms. Numba just-in-time (JIT) compilation accelerates pairwise interaction calculations by 10--100times, enabling simulations of 150--250 agents over 1000--2000 time steps within five minutes on standard workstation hardware. NetCDF4 output ensures interoperability with oceanographic analysis tools. The library addresses the need for standardized, reproducible infrastructure in collective behavior modeling analogous to established molecular dynamics codes.