adding "explore_improved=true" to crawlrc. The intent is to reduce backtracking and zig-zagging during auto-explore. Currently only works with non-greedy explore since I can't yet figure out how to intelligently combine it with greediness.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3084 c06c8d41-db1a-0410-9941-cceddc491573
F2ZJ55CL3T66DFM34BQWCJNHIT4XJFCGTWTA5KESV6NHWFLTGUYAC EWC3J3FZP62OZWT3JBBPNPZUB7NR5ZF6MAJNMPCVV75E3TFBFYYAC AS2IQQJNNCEQNXXKTGYHLB7RO3ZKCF4F7GK6FJH66BOOKDDRGNIQC WL5WZXFJ6TONUQRSHUY4GQ5USU47ILWNN5X2JDQZO4CRJJZSRQIAC XYBPIU6AQ77EID4VNOMI7KQZULZI4VBZHHIGBRYO7QRJVCODEKYAC RC6L3CIBLJEH4GWRFD7UQNGI6PZT74FRUVOYHSAN2XCC74NZUASQC SDLKLUNFGVKDS55DDJZCBAVIB7NL3RRYPTACAY65SCUQKV6APFSAC RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC 7Y5HSDFKA5TPLS2TWTRFMQVX6UXUDHXU5MUMXQSDFAIY4THQ3BIQC FCZSQBKDNMJZRJS2LWQQWLUFGOXSKXDJZQIHC7L5S7HXCXQPOMMAC 3YK4G4IQBXW63HPGU5WRTV6L2FCMKAK4DOTCHFK2FNSB5B3Y3PVQC 547JREUJXTZNYVGHNNAET5F5O5JYYGNTDQB6ABZNT7YX5EY64OHAC ZJLJGSB2XSBQU42OFQMXL3EG4CXAQGOYAU6YTV2SAWZEJIPFH2CAC EOMCPVNQLX3IMLC46EAO67DPBH5KEG2FQTPBLGU62HIRWA3UQ7XQC TJISAZK5RWKXIIC5UTQNY4KT3UX3ASGBUQQNWZ7ZDULPRYFRZXQQC ZCRK2DJ5VKECRQXZTWT4NUDL2VT5ZHUK7NT6NQPLRJ56TDX5PJSAC XPCGZBHHSL6MB3ORMUJI64BAERU6AZTIY6RK56BBW7SNB3IK24IAC RVST2QHYJ757ZHK4AUJ5NGPDZ44AD6RVFVXYPKQIBJXZBDNUCHXQC tp.set_floodseed(coord_def(you.x_pos, you.y_pos), true);
coord_def seed = you.pos();// "Improved" explore: keep moving in a line along the same// direction as the previous move, stop if we hit a barrier or// something that would slow us down, and use *that* as the// floodout seed. This is meant to://// 1) Prevent explore from sticking its head in a room and then// backing out even though the room has unexplored corners// because there are unexplored squares closer than the corners.//// 2) Similarly, prevent the bevahior of going a little bit down// a long, straight corridor only to back out of it because// the nearest unexplored square in that corridor is// LOS_RADIUS + 1 squares away, which is further away than// another unexplored square which is in the opposite direction.//// 3) Prevent the annoying zig-zag when exploring open spaces.//// We stop at squres that would slow us down so that we won't slog// across a bunch of shallow water just for the sake of going in// a straight line.//// Not yet used with greedy explore because I can't figure out// how to combined it with greediness in a way that won't display// weird or uninuitive behavior.if (you.running != RMODE_EXPLORE_GREEDY && Options.explore_improved&& (you.prev_move_x || you.prev_move_y)){coord_def prev_move_delta = you.prev_move();dungeon_feature_type feature;do {seed += prev_move_delta;feature = grd(seed);} while (is_travelsafe_square(seed.x, seed.y)&& is_traversable(feature)&& feature_traverse_cost(feature) == 1);seed -= prev_move_delta;