## Ponderate dijkstra relative to previous position

I use dijkstra in my rust game to find path to a destination. My game is in a square grid like this:

There is, for illustration, the Rust code which use dijkstra:

``use crate::map::Map; use crate::physics::GridPoint; use pathfinding::prelude::dijkstra;  pub fn find_path(map: &Map, from: &GridPoint, to: &GridPoint) -> Option<Vec<GridPoint>> {     match dijkstra(from, |p| map.successors(p), |p| *p == *to) {         None => None,         Some(path) => Some(path.0),     } }  // ...  pub fn successors(&self, from: &GridPoint) -> Vec<(GridPoint, i32)> {         let mut successors = vec![];          for (mod_x, mod_y) in [             (-1, -1),             (0, -1),             (1, -1),             (-1, 0),             (0, 0),             (1, 0),             (-1, 1),             (0, 1),             (1, 1),         ]         .iter()         {             let new_x = from.x + mod_x;             let new_y = from.y + mod_y;              if new_x < 0 || new_y < 0 {                 continue;             }              if let Some(next_tile) = self.terrain.tiles.get(&(new_x as u32, new_y as u32)) {                 successors.push((GridPoint::new(new_x, new_y), next_tile.pedestrian_cost))             }         }          successors     } // ...  ``

And visualization of found path (white is found path, pink is goal):

The found path is not a direct line. I’m not surprised, because the weight of diagonal is the same as lateral. With what I understand with dijkstra is I can return successor with weight for a coordinate. But I can’t increase weight of diagonal/lateral according to previous position (ex: comming from West -> moving to Est will be less weight; maybe it is not the solution …).

How can I achieve that ? With another algorithm than dijkstra ?

## New project vs previous project same amount of links?

Hi, how are things! I have a question:
I just created roughly 10k verified links from a single project.
I want to use those 10k links and upload them to another new project.
If I import from the previous project, in theory, the new project would have to generate the same amount, is that correct?
PS: The new project will have the same configuration.

thanks

## how to make sure your wordpress is clean of any old files from previous themes so you can install a new theme

with no issues from past themes/plugins. The goal here is I am planning to install a premium theme for my existing WP site and use Divi Plugin So far I’ve tried contacting Bluehost but they just did a ‘scan’ or something so I don’t know if they understood what I meant. I’m relatively new to WP. Tinkering for about 2 years. I’ve tried google searching and irrelevant articles pop up. When searching this site I got 0 results. Hope I’m articulating my question well.

## In lore has Annam ever returned in previous editions/stories

I am working on a campaign setting idea where Annam returns and then triggers a series of cataclysmic events.

Much of my inspiration for this is the initiation of Ghehenna in the world of darkness series and there is a strong possibility my campaign setting will be brought to a total end, or at least be forever changed.

My question is, in the history of DnD and the many published stories, adventures and campaign settings defined has the potential/actual return of the God of giants, and what the potential outcomes of it could be?

## Need to add a script to my query that replaces ‘0’ values with the previous non-zero values

I need a query that replaces the zero values on the COND, Temp and TOC columns with the previous non-zero value. For example:

COND Column (Current): 1 12 3 0 0 5 6 7 0 0 0

COND Column (Expected): 1 12 3 3 3 5 6 7 7 7 7

Any help will be appreciated! Thanks in advance

## Can I start a new rage before the previous one ends?

Is there anything preventing a Barbarian that is currently raging from using a bonus action to expend another rage and restart the 1 minute duration on their rage?

## After death & reincarnation does a wizard need to recast Find Familiar? Does he or she get the previous one or a ‘new’ one?

A wizard dies – but his familiar escapes unharmed. He &/or she (the wizard) is Reincarnated, via the spell. He &/or she gains a new race with new abilities. Basic skills, proficiencies, physical (Str / Dex / Con) and psychological abilities (Int / Wis / Cha) all change as RAW dictates (‘its complicated’).

He &/or she had a familiar previous to death. The familiar survived, as noted, as he &/or she &/or it (possibly spayed?) was off on an errand and did not die.

What happens upon wizard seeking his &/or her familiar?

Does the wizard need to re-cast Find Familiar? If he &/or she does (&/or does not), does this wizard gain the same old shape (fae, celestial, fiend) & style (possibly spayed?) familiar as previous – or is it a brand-spanking-new fresh off the press familiar out of the Outer Planes?

Repeat of Question: Wizard has familiar. Wizard dies YET familiar is okay. Wizard gains a new body. Wizard must re-cast Find Familiar: yes / no? Wizard gets a NEW familiar, yes / no?

## Next Previous siblings child pages

I tried this piece of code : https://wordpress.stackexchange.com/a/54474/80921 because I couldn’t figure out how to get the next and the previous post. But this code won’t work now and I’m not able to comment.

The error I get is "Undefined offset: -1" when looking for the ID. Here is the full code found on the related page. Thanks for any help !

``\$  pagelist = get_pages("child_of=".\$  post->post_parent."&parent=".\$  post->post_parent."&sort_column=menu_order&sort_order=asc"); \$  pages = array(); foreach (\$  pagelist as \$  page) {    \$  pages[] += \$  page->ID; }  \$  current = array_search(\$  post->ID, \$  pages); \$  prevID = \$  pages[\$  current-1]; \$  nextID = \$  pages[\$  current+1]; ?>  <div class="navigation"> <?php if (!empty(\$  prevID)) { ?> <div class="previous"> <a href="<?php echo get_permalink(\$  prevID); ?>" title="<?php echo get_the_title(\$  prevID); ?>">Previous</a>  </div> <?php } if (!empty(\$  nextID)) { ?> <div class="Next"> <a href="<?php echo get_permalink(\$  nextID); ?>" title="<?php echo get_the_title(\$  nextID); ?>">Next</a> </div> <?php } ?> </div> ``

## What are some good feats for sorcerer’s from current or any other previous versions of Dnd? [closed]

I am playing a shadar kai, Giant Soul(strom) sorcerer(level 06).
I took the crossbrow experties feat at level 1.
I have +4 mod on both Dex and Cha, and a +3 mod on Con. (I have +6 bonus on Con saves).
With haste, shield, absorb element and shadar kai’s necrotic damage resistance I fight in melee.

My my usual attack pattern is-
1.Go in mele use shocking grasp
2.haste atk-use a hand crossbow
3.bonus action-another hand crossbow atk(Through crossbow experties feat)

Why min-maxing? Because eveeryone in the party does. If I don’t I will feel useless in combat. The DM has allwed a lot of previous version material to the other players.

I have already thought of war caster, but with the defence I have conscentration is not a big problem. Also, if shocking grasp hits I can back off without provoking opportunity attack and have the 60′ movement due to haste.

With this build of mine what would be the best feat for me(any verion/any book)?

## Does regret change when the loss function is dependent on the previous predictions?

The loss function of each expert in the expert advice problem(or any online learning problem) depends on the time($$t$$) and expert advice at that time($$f_{t}(i)$$). suppose in this problem, loss function depends on the previous prediction of the algorithm. $$l _{t} (i) = p_{1} p_{2} \cdots p_{t-1}f_{t}(i)$$ such that $$p$$ show prediction of algorithm.

Does the upper bound of regret change?