Jump to content
  • Advertisement
Sign in to follow this  

Don't have enough windows for WHCA*

This topic is 1507 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!