TCHS 4O 2000 [4o's nonsense] alvinny [2] - csq - edchong jenming - joseph - law meepok - mingqi - pea pengkian [2] - qwergopot - woof xinghao - zhengyu HCJC 01S60 [understated sixzero] andy - edwin - jack jiaqi - peter - rex serena SAF 21SA khenghui - jiaming - jinrui [2] ritchie - vicknesh - zhenhao Others Lwei [2] - shaowei - website links - Alien Loves Predator BloggerSG Cute Overload! Cyanide and Happiness Daily Bunny Hamleto Hattrick Magic: The Gathering The Onion The Order of the Stick Perry Bible Fellowship PvP Online Soccernet Sluggy Freelance The Students' Sketchpad Talk Rock Talking Cock.com Tom the Dancing Bug Wikipedia Wulffmorgenthaler |
bert's blog v1.21 Powered by glolg Programmed with Perl 5.6.1 on Apache/1.3.27 (Red Hat Linux) best viewed at 1024 x 768 resolution on Internet Explorer 6.0+ or Mozilla Firefox 1.5+ entry views: 1412 today's page views: 285 (70 mobile) all-time page views: 3208011 most viewed entry: 18739 views most commented entry: 14 comments number of entries: 1203 page created Sun Jan 19, 2025 18:54:22 |
- tagcloud - academics [70] art [8] changelog [49] current events [36] cute stuff [12] gaming [11] music [8] outings [16] philosophy [10] poetry [4] programming [15] rants [5] reviews [8] sport [37] travel [19] work [3] miscellaneous [75] |
- category tags - academics art changelog current events cute stuff gaming miscellaneous music outings philosophy poetry programming rants reviews sport travel work tags in total: 386 |
|
- programming - Subject: A code fragment of the A* search (pathfinding) algorithm, coded from scratch. pa[C+maxcol*R][0] stores the row of the parent node of the node at row R and column C. pa[C+maxcol*R][1] stores the col of the parent node of the node at row R and column C. This algorithm desires to begin from the goal node and work backwards, thus printing out the path to the start node. There is one small mistake that cost me about an hour. Where is it? (Alvin Award up for grabs!) while (!(tr==-1 || tc==-1)) { length++; printf("NODE: %d %d\n", tr, tc); if (!(tr == startrow && tc == startcol) && !(tr == endrow && tc == endcol)) { ma[tr][tc] = 8; } trl = tr; tcl = tc; tr = pa[tc+maxcol*tr][0]; tc = pa[tc+maxcol*tr][1]; } Next: Projecting Ire
|
|||||||
Copyright © 2006-2025 GLYS. All Rights Reserved. |