• Register

A complete JavaScript framework for building 3D games with HTML5, WebGL and Web Audio. Main features Transparent WebGL 1.0/WebGL 2.0 support Complete scene graph with lights, cameras, materials, meshes, animations, audio & actions Native collisions engine Physics engine (thanks to oimo.js & cannon.js Scene picking Supports left and right handed systems Antialiasing Animations engine Particles & Solid Particles Systems Sprites and 2D layers Complete audio engine based on Web Audio Works on all WebGL platforms via a specific modern shader architecture and native touch support: IE11/MS Edge, Chrome, Firefox, Opera, Safari, iOS (iPad/iPhone), Android, Windows Phone 8.1/Mobile 10, Firefox OS, Xbox One

Post news Report RSS Smarter Enemy, More Realistic Gameplay

Machine-learning boost to the AI. The computer opponent will now use a database of historical engagement to determine the best strategy to achieve its objectives.

Posted by on

This week's update is focused on bug fixes, small visual improvements, creating a smarter AI, and improved gameplay. Currently, the AI is driven by simple if-then logic and hardcoded rules-of-thumb. If an enemy approaches, engage. If you are a ship engaging another ship, fire 2 salvos of antiship missiles.

ifthen

As you can imagine, this behaviour lends to boring and easy gameplay. The AI is predictable and sometimes may wrong choices. It does not learn from those choices.

So, this week is about rewriting some of the underlying logic to enable smarter Ais that learn. If the last salvo failed to hit the enemy, the AI will then try to launch a larger salvo. If the previous sortie was destroyed, launch a larger flight. Every engagement is saved and the computer uses this database of engagements to decide the salvo size before launching the next engagement.

You can see from the example below. At first, the Sovremmeny tries to engage my Type 26 with 2 of its antiship missiles. The missiles, which fly at sea level, are finally picked up by my frigate around 30km away, just short of its radar horizon. When the enemy missiles reach 25km of the Type 26, the ship immediately dispatches a salvo of Sea Ceptor missiles to counter the threat. The antiship missiles are downed and the threat is over.

In the second round, the Sovremmeny knows that 2 antiship missiles are not enough to defeat the defenses of the Type 26 so it launches 4 missiles in one quick salvo. The Type 26 is able to intercept the second ASM salvo so the Sovremmeny, in the third engagement, launches 6.

This smart(er) AI is not only available as a computer opponent, you can enable the AI to control your units by Delegating Authority. Switching this on lets the unit act on its own accord, allowing it to either conduct offensive actions, defend, launch subunits or emit its active sensors. This would be useful in the future, as the game is developed to allow you to control more units on the battlefield. Here is the Type 26 dishing out salvos of ASM and launching a helicopter against a Russian destroyer.

In addition to tactical AI improvements, a number of upgrades were made to real-time AI actions. In the following case, a task group based on the Queen Elizabeth-class carrier is able to automatically assume formation around the principal, the carrier. Changing directions lead the escort units to find their proper relative positions and fluidly assume their new stations.

formation

In the future, this machine-learning approach will be used to drive AI strategy. This will include everything from forming groups to combat the enemy to determining whether to fight or flight.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Platforms
Windows, Mac, Linux, VR, AR, Web, iOS, Android, XONE
Contact
Send Message
Licence
MIT
Release date
Engine watch
Follow
News
Browse
News
New
Post news
Report
Report
Share
Related Games
WarSim
WarSim Real Time Strategy
Related Engines
BABYLON.js
BABYLON.js MIT
HTML5
HTML5 Commercial
Related Groups
Indie Gamers
Indie Gamers Hobbies & Interests with 1,506 members
PC Gamers
PC Gamers Hardware & Tech with 743 members