Searching for open source AI frameworks

I’m looking for open source AI frameworks that can be used with C++, Java, or ActionScript but I haven’t had any luck finding them. Could anyone suggest any free AI implementations that might be helpful?

Update: I’m amazed by how broad the field of AI is! To clarify, I’m developing a sample application and would like to integrate intelligent behavior into a physics engine. I specifically need an AI framework tailored for game development.

Has anyone had experience with AI libraries focused on games? What would you recommend for someone who’s just starting to work with AI in game design?

For Java, check out AIMA-Java - it’s the companion code for the classic AI textbook and covers search algorithms to neural networks. Perfect for game AI basics.

LibGDX’s AI extensions are underrated. Not pure AI, but solid pathfinding and state management that works great with game physics. Used it last year for NPCs navigating complex terrain.

If you’re doing ActionScript (Flash era!), look for AS3 ports of common algorithms. The community made decent steering behavior libraries back then.

This video breaks down building AI agents from scratch - really helps you understand what’s happening under the hood:

Lesson I learned the hard way - start simple with finite state machines before jumping to behavior trees. Get your basic AI loop working with the physics engine first, then add complexity. Integration issues will bite you if you don’t nail the basics.

OpenSteer is solid for steering behaviors - I’ve used it with multiple physics engines and it handles flocking, pursuit, and obstacle avoidance really well. The C++ code is clean and the docs cover most game dev scenarios you’ll hit. MicroPsi is another option with cognitive architectures, but it’s probably overkill unless you need that complexity. Don’t build your own finite state machines - grab a statechart library instead. They’ll save you tons of time managing complex AI across multiple objects.

JSFML’s got some decent AI stuff if you’re using Java, but it’s mainly for graphics. For actual game AI logic, check out Neuroph - it’s Java-based and handles neural networks well for NPC learning behaviors. Integrating with physics engines takes work but it’s totally doable. Here’s something I wish I’d known earlier - utility-based AI systems are gold. They’re way simpler than behavior trees but super flexible when NPCs need to juggle multiple factors like health, resources, and threats. I built a custom utility system last year that crushed my overcomplicated behavior tree setup. Also, most physics engines like Bullet already have collision detection that plays nice with AI pathfinding. Just use that instead of coding your own obstacle detection from scratch.

I’ve worked on game AI for a while, and BehaviorTree.CPP is solid for C++ projects. It’s lightweight, integrates well with physics, and has good community support. If you want more complex decision-making, check out open-source GOAP implementations - they’re trickier to learn but make NPCs way more dynamic. For pathfinding, Recast Navigation is my go-to. Great navmesh support and plays nice with physics engines.