Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Wednesday, November 19th, 2008

Time Event
6:20p
I'm working on implementing an A* search algorithm for a class.

I'm using javascript, for ease of UI. I've got a big grid of buttons.

I have an array of paths, sort them by their cost, and then pop the lowest cost path from the array and then expand it.

The problem is eventually, and inexplicably, this pop returns an undefined variable. Before popping, I check to see if the array is empty, and it isn't.

Any idea what the problem might be?

The page in question (still in development, only tested under Firefox): http://asmor.com/school/a-star/

<< Previous Day 2008/11/19
[Calendar]
Next Day >>
About LiveJournal.com
Image