• Breaking News

    Friday, June 11, 2021

    Why does running A* with a bigger heuristic make you expand less nodes? Ask Programming

    Why does running A* with a bigger heuristic make you expand less nodes? Ask Programming


    Why does running A* with a bigger heuristic make you expand less nodes?

    Posted: 11 Jun 2021 12:06 PM PDT

    Hello everyone, I have two consistent heuristics h1(n) and h2(n) and for all n we have h2(n) >= h1(n), i.e. the latter dominates the first one. In the notes I took during my class I wrote that running A* with h2(n) will expand less nodes A* with h1(n).

    Now, I know a result stating that A* expands all the nodes with f(n) < C* and maybe some node with f(n) = C* if C* is the cost of the optimal goal and f(n) is a function that estimates the cost of the cheapest solution that passes through n, i.e. the function used to sort the nodes inside the frontier. At this point we can say that, called E1 the set of all nodes expanded with h1 and E2 the same thing for h2 :

    1. E1 = { n : h1(n) < C* - g(n) } v { n : h1(n) = C* - g(n) }
    2. E2 = { n : h2(n) < C*- g(n) } v { n : h2(n) = C* - g(n) }

    Here g(n) is the same among all the sets, and unless we're in an unlucky case where there are many nodes whose "score" equals that of the optimal goal we can say most of the nodes for both E1 and E2 are in the sets on the left.

    Now, my notes state that { n : h2(n) < C*- g(n) } ⊆ { n : h1(n) < C* - g(n) } where I would instead intuitively expect the opposite as having a bigger value for h(n) means that C* - g(n) can be larger and thus more nodes would satisfy the condition. What am I missing here? TIA

    submitted by /u/BaffoRasta
    [link] [comments]

    Change career path?

    Posted: 11 Jun 2021 02:00 PM PDT

    Hello, I have a stupid question but I'm a little bit curious about what other people think. Currently I work as a frontend developer even tho I'm still a student (studying electronics), and I've came to realize that I don't really like what I'm doing, for some reasons I feel like I don't know enough and I can't learn more about web, because sometimes it stops attracting me, compared to 1-2 year ago when I was able to read and watch videos all day long about web development. It's quite a strange feeling because on the other hand, I don't want to leave my job, I kinda like React and JavaScript, (but I hate writing css...), but when I try to level up my knowledge I get very "distracted", and I can give you some examples: we use webpack in our projects and I wanted to understand better how it works under the hood, found a very interesting book, but half way through it, I got distracted and I've decided to learn some Django (I'm not new to python), again, got distracted and got curious about how python servers works under the hood, what is an wsgi, again, got distracted and tried to learn some Rust... It's a cycle that keeps on going, 2 months ago I read an entire C book, I kinda liked it, I was even thinking about trying to learn more about compilers. Hope you get the idea.

    Is this a common phase for new developers? Should I just give up on what I'm doing and try another technology? Maybe software development isn't for me lol even though I can't live a day without watching or writing some code.

    If you find my question stupid or, if this isn't the place for asking such questions, sorry.

    submitted by /u/anakataidk
    [link] [comments]

    Help!

    Posted: 11 Jun 2021 03:17 PM PDT

    I made a code that you will shoot when you have clicked on the right mouse button

    But how can I do that it can only shoot when I have my gun in my hands

    Like a if gun is picked up than shooting = true???

    Sorry for my English

    submitted by /u/Alexidou12055
    [link] [comments]

    No comments:

    Post a Comment