Lair Larrikin
Posts: 18
Joined: Tuesday, 14th January 2014, 20:24
Autoexplore improvement
This way, it would more or less make a spiral from the edges to the center of the map, and reduce useless movements across the map.
Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.
Lair Larrikin
Posts: 18
Joined: Tuesday, 14th January 2014, 20:24
Mines Malingerer
Posts: 36
Joined: Saturday, 26th October 2013, 03:36
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Lair Larrikin
Posts: 18
Joined: Tuesday, 14th January 2014, 20:24
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Mines Malingerer
Posts: 45
Joined: Wednesday, 23rd October 2013, 00:00
galehar wrote:yes it is
Lair Larrikin
Posts: 18
Joined: Tuesday, 14th January 2014, 20:24
Zot Zealot
Posts: 1031
Joined: Friday, 26th April 2013, 19:52
Location: AZ, USA
Lair Larrikin
Posts: 18
Joined: Tuesday, 14th January 2014, 20:24
Slime Squisher
Posts: 354
Joined: Tuesday, 14th January 2014, 23:33
Swamp Slogger
Posts: 147
Joined: Thursday, 29th August 2013, 02:22
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Tomb Titivator
Posts: 853
Joined: Thursday, 29th August 2013, 18:39
Slime Squisher
Posts: 354
Joined: Tuesday, 14th January 2014, 23:33
galehar wrote:There is already a little hack to prevent travel from cutting unexplored corners to reduce the risk for ambush.
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
// Check whether this step puts us adjacent to any grid we haven't ever
// seen or any non-wall grid we cannot currently see.
//
// .tx Moving onto t puts us adjacent to an unseen grid.
// ?#@ --> Pick x instead.
// Only applies to diagonal moves.
if (rmode == RMODE_TRAVEL && *move_x != 0 && *move_y != 0)
{
coord_def unseen = coord_def();
for (adjacent_iterator ai(dest); ai; ++ai)
if (!you.see_cell(*ai)
&& (!env.map_knowledge(*ai).seen()
|| !feat_is_wall(env.map_knowledge(*ai).feat())))
{
unseen = *ai;
break;
}
if (unseen != coord_def())
{
// If so, try to use an orthogonally adjacent grid that is
// safe to enter.
if (youpos.x == unseen.x)
new_dest.y = youpos.y;
else if (youpos.y == unseen.y)
new_dest.x = youpos.x;
// If the new grid cannot be entered, reset to dest.
// This means that autoexplore will still sometimes move you
// next to a previously unseen monster but the same would
// happen by manual movement, so I don't think we need to worry
// about this. (jpeg)
if (!_is_travelsafe_square(new_dest)
|| !feat_is_traversable_now(env.map_knowledge(new_dest).feat()))
{
new_dest = dest;
}
#ifdef DEBUG_SAFE_EXPLORE
mprf(MSGCH_DIAGNOSTICS, "youpos: (%d, %d), dest: (%d, %d), unseen: (%d, %d), "
"new_dest: (%d, %d)",
youpos.x, youpos.y, dest.x, dest.y, unseen.x, unseen.y,
new_dest.x, new_dest.y);
more();
#endif
}
}
Ziggurat Zagger
Posts: 4478
Joined: Wednesday, 23rd October 2013, 07:56
galehar wrote:explore_wall_bias works in a similar way and gives a higher weight to cells adjacent to walls.
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Dungeon Master
Posts: 162
Joined: Sunday, 29th May 2011, 10:18
johlstei wrote:Just prove P=NP and solve travelling salesman(with incomplete information) already.
Slime Squisher
Posts: 354
Joined: Tuesday, 14th January 2014, 23:33
Sprucery wrote:galehar wrote:explore_wall_bias works in a similar way and gives a higher weight to cells adjacent to walls.
What kind of values are usable for this? The Options Guide says
What should I try for higher values: 1, 10, 100, something else?
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
TheDefiniteArticle wrote:If I read the code correctly, it ranges from 0 to 1000. Currently my preference is for 200. It's hard to say anything really helpful though, as the behaviour can seem strange/unexpected until you get a handle on it. I'm still playing around with different numbers and it's all rather unscientific because as this thread demonstrates nobody cares about crawl's autoexplore.
Crypt Cleanser
Posts: 700
Joined: Wednesday, 5th January 2011, 15:51
Tomb Titivator
Posts: 778
Joined: Thursday, 13th March 2014, 20:15
galehar wrote:TheDefiniteArticle wrote:If I read the code correctly, it ranges from 0 to 1000. Currently my preference is for 200. It's hard to say anything really helpful though, as the behaviour can seem strange/unexpected until you get a handle on it. I'm still playing around with different numbers and it's all rather unscientific because as this thread demonstrates nobody cares about crawl's autoexplore.
There's a wizmode command (&O) to benchmark autoexplore. Improving the efficiency of autoexplore isn't a priority, but it's still good. Testing the wall bias option, suggesting a default value and pointing out at its flaws would be helpful.
200 seems huge though. It's a distance, 200 is 5 times the maximum width of a level. The value for greedy pickup is 10.
explore_improved = false
If set to true explore will attempt to reduce zig-zagging during
auto-explore. On average it increases the number of turns taken
by about 0.9%, sometimes actually speeding it up slightly and
sometimes increasing the turns taken by up to 5%, with
pathological cases causing a 13% increase.
Dungeon Master
Posts: 4031
Joined: Thursday, 16th December 2010, 20:37
Location: France
Eyesburn wrote:Looks like ~70 is the highest value for explore_wall_bias (tried with 1000, 200, 100, 90, 80, 70, 60, 40, 20, 0).
At higher values autoexplore path is kinda "smarter". For my options I use explore_wall_bias = 35.
Ziggurat Zagger
Posts: 4478
Joined: Wednesday, 23rd October 2013, 07:56
Ziggurat Zagger
Posts: 5832
Joined: Thursday, 10th February 2011, 18:30
Ziggurat Zagger
Posts: 5832
Joined: Thursday, 10th February 2011, 18:30
Sprucery wrote:That makes me curious: does someone use autoexplore in Abyss or Slime?
Tomb Titivator
Posts: 778
Joined: Thursday, 13th March 2014, 20:15
galehar wrote:Interesting. Have you tested it in unusual levels, like Abyss, Shoals or Slime?
Return to Game Design Discussion
Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 22 guests