Opened 9 years ago

Closed 9 years ago

#2960 closed task (fixed)

AI should support different map resolutions

Reported by: mimo Owned by: Itms
Priority: Should Have Milestone: Alpha 19
Component: AI Keywords: pathfinding
Cc: Patch:

Description

The AI uses internally 3 kinds of maps:

  • the passability map (from simulation)
  • the territory map, containing the owner of each cell (from simulation)
  • resource map (created internally)

In the present code, all maps were supposed to have cells of 4x4m as passability and territory maps from simulation were 4x4 maps. But in the new pathFinder branch being developped, the passability map will be 1x1m while the territory one will be 8x8m. So the AI should be able to cope with maps of different resolutions.

Change History (9)

comment:1 by mimo, 9 years ago

In 16062:

add AI support of maps of different dimensions, see #2960

comment:2 by mimo, 9 years ago

With the last commit, the AI common-api supports maps of different dimension, but this has still to be implemented in Petra.

comment:3 by mimo, 9 years ago

In 16072:

make Petra support passability and territory maps of different resolutions, addresses #2960

comment:4 by mimo, 9 years ago

r16072 provides the adaptation of Petra to maps of different resolutions. For performance reasons, it nonetheless assumes that cell sizes are multiple of each other, i.e. that each cell of the finer resolution map is fully contained in one cell of the other map. This was done because the new pathFinder branch has passability and territory maps of different resolutions. But, there is still a problem of incompatibility between the AI and the new pathFinder branch. The AI needs to know which cells are not passable and which one are obstructed while both bits are merged in the passability map of the new pathFinder (for performance reason I think). So we need that the new pathFinder either revert this change, or find a way to send the needed info to the AI.

comment:5 by mimo, 9 years ago

There is additionnal info on this incompatibility in http://irclogs.wildfiregames.com/2014-12-24-QuakeNet-%230ad-dev.log between 13h30 and 14h

comment:6 by Itms, 9 years ago

Keywords: pathfinding added

comment:7 by Itms, 9 years ago

Milestone: Alpha 18Alpha 19

comment:8 by mimo, 9 years ago

In 16687:

Petra: improve storehouse placement and fix some inconsistencies with new pathFinder refs #2960

comment:9 by Itms, 9 years ago

Owner: set to Itms
Resolution: fixed
Status: newclosed

In 16751:

New long-range pathfinder.

Based on Philip's work located at http://git.wildfiregames.com/gitweb/?p=0ad.git;a=shortlog;h=refs/heads/projects/philip/pathfinder
Includes code by wraitii, sanderd17 and kanetaka.

An updated version of docs/pathfinder.pdf describing the changes in detail will be committed ASAP.

Running update-workspaces is needed after this change.

Fixes #1756.
Fixes #930, #1259, #2908, #2960, #3097
Refs #1200, #1914, #1942, #2568, #2132, #2563

Note: See TracTickets for help on using tickets.