Jump to content
  • Advertisement
Sign in to follow this  

Don't have enough windows for WHCA*

This topic is 1335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Currently, I am porting WHCA* to C++.

But I encounter a strange bug just because of my mistakes.

But I don't see where it happens.


First, in the function

void Coordinater::putUnitInWindow(ObjectBase *unit, int position)
     std::vector<ObjectBase*> unitsAtT;
     if (window.find(position) != window.end())
            unitsAtT = window.at(position);
     // if not found in nodepool
     if (unitsAtT.empty())
           window.insert(std::make_pair(position, unitsAtT));
     else {

This produces 9 windows. But the depth must be set to at least 4. When I change it to a depth of 32.

9 windows just won't fit as time moves forward and each window only contains one agent

I should have 9 agents with at least 32 windows. Let me try to zip the file to this forum....



Edited by lucky6969b

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!