Newswire
Features
Connection
Job Search
Directories

by Mark Brockington
Gamasutra
June 27, 2000

Printer Friendly Version
   
Discuss this Article

Features

Pawn Captures Wyvern: How Computer Chess Can Improve Your Pathfinding

Listing 3. The Code For The Algorithm That Drives IDA*

int ComputeNumberOfMoves(position startposition)
{
    int fmax;    /* maximum distance to search */
    int bFoundPath = FALSE;

    fmax = EstimateDistanceToGoal(startposition);
    while (bFoundPath == FALSE)
    {
        bFoundPath = IDAStar(startposition);
        if (bFoundPath == FALSE) { fmax += 1; }
    }
    return fmax;
}
___________

Back to Article

Home   JoinHelpContact UsShop
 


Home | Join | Help | Contact Us | Shop | Newswire | Site Map
Write for Us | Features | Connection | Job Search | Directories


Copyright © 1999-2000 Miller Freeman Inc. All rights reserved.
Privacy Policy

Miller Freeman Game Group: GDC, GDMag, IGF Independent Games Festival Game Developer Magazine Game Developers Conference