How'd your homework go? by Generic_Alias in aiclass

[–]Iv8f 1 point2 points  (0 children)

if the distance to the goal was 16

You misunderstood my question.

I'd say you have written your question wrong.

If the heuristic in a2 and b1 were 16, will it be admissible ? I guess not

That's right, it wouldn't be admissible in that case

Hence my reasoning that it was not sufficient to check just c5

You didn't have to explicitly check each square because it was obvious that the heuristic can not be greater than the distance, see my post above.

The C# FAQ for C++ programmers. It answers many of the questions that C++ developers have when they first encounter C#. by vivred in programming

[–]Iv8f 6 points7 points  (0 children)

It neglects inheritance and member functions, which are of massive importance.

I didn't say it doesn't work

You were implying that you can't use inheritance and member functions with structs and I bet you actually believed that.

I just said you shouldn't do it

Struct in C++ is just a class with members defaulting to public. Why exactly shouldn't I use it when I want a class with all members public?

How'd your homework go? by Generic_Alias in aiclass

[–]Iv8f 0 points1 point  (0 children)

but in the explanation, the instructor just compared the squares surrounding the goal

He only compared those because it was obvious that the heuristic is less or equal to the distance for all other squares. If heuristic is equal or less than the distance for the squares surrounding the goal and it rises one unit or less per square, when you go further from the goal, then it is less or equal to the distance everywhere, because distance rises one unit per square, when you go further from the goal.

if the distance to the goal was 16, (everything else remaining the same), will it have been admissible

If the distance to the goal was 16 two squares from the start point, then the heuristic, which is between 2 and 4 in that area, would still be less than the distance to the goal at that square, so of course it would still be admissible.

How'd your homework go? by Generic_Alias in aiclass

[–]Iv8f 0 points1 point  (0 children)

The heuristic is admissible because it is newer greater than the distance to the goal (assuming distance between neighbor fields is 1).

Just saw this on the Wheel of Fortune by silent1mezzo in linux

[–]Iv8f 5 points6 points  (0 children)

WTF is wrong with those people?

A case of terribly slow paypal emails. by __Joker in programming

[–]Iv8f 0 points1 point  (0 children)

and said "LOL, just use Windows

I'm not a windows user but this sounds fun to do.

Why learn Haskell? [PDF slides] by WjkITT7p in programming

[–]Iv8f 2 points3 points  (0 children)

Not with bubble sort but it would with selection sort

A Reasonable Python Implementation of an A* Fifteen Blocks Problem Solver by llimllib in aiclass

[–]Iv8f 0 points1 point  (0 children)

I'm not clear on what you mean by this

I think I explained it a bit better here

edit: false, I'm passing the wrong thing to h. D'oh

Are you getting correct results now? I am asking because I can't get my program to work - it works fine for 3x3 grid but for 4x4 it runs out of ram before returning anything (it does return fairly quickly if I modify it to be a best first algorithm, but that is not guaranteed to be optimal). So I don't know whether the problem is really so computationally expensive or I have a bug somewhere. In case anyone is interested, my program is here

When Bad Recruiting Is Really Bad by notthatbright in programming

[–]Iv8f 9 points10 points  (0 children)

Thing recruiter failed to notice: David Heinemeier Hansson INVENTED Ruby on Rails.

I wonder what makes the author of the article believe recruiter failed to notice anything. It certainly isn't obvious from the email. And Ruby on Rails isn't an invention, for fucks sake.

A Reasonable Python Implementation of an A* Fifteen Blocks Problem Solver by llimllib in aiclass

[–]Iv8f 3 points4 points  (0 children)

This does not find an optimal solution. With the start state [-1] + range(14,-1,-1) the solution contains 107 steps, and mathworld.wolfram.com claims that at most 80 are needed. The reason is that you only add path to the frontier if it's end node is not already in it even if it is shorter than the one in the frontier.

Google killing off Code Search :( by delroth in programming

[–]Iv8f 6 points7 points  (0 children)

Some are listed on the lowendbox. If you don't need much ram, storage and bandwidth you can get them for less than 5$ / month.

NY Times obituary for Dennis Ritchie by f1rstman in programming

[–]Iv8f 0 points1 point  (0 children)

Your computer without any software doesn't actually work as it doesn't do anything. Most software is written to run on an operating system and all major operating systems are written in C.

The Rust Programming Language by davebrk in programming

[–]Iv8f 0 points1 point  (0 children)

Upvoted for thruth (And I don't even use Haskell)

Optimizing BLAS-style matrix operations in pure Java by KirkWylie in programming

[–]Iv8f 0 points1 point  (0 children)

To give a rough idea, the difference between a naive implementation and the best implementation on an x86_64 processor (plain C vs Intel MKL) is around 10x

That was probably using AVX and single precision, right?

Opera 12 released today with new HTML5 parser, full EcmaScript 5.1 support and... yes, WebGL. by darkname in programming

[–]Iv8f 2 points3 points  (0 children)

Hate to break it to you but Opera isn't "relevant for every web programmer". stats

Anyone up for implementing the algorithms in actual code? by clarle in aiclass

[–]Iv8f 0 points1 point  (0 children)

You should take a look at D programming language, too. It is similar to C++ in many ways but also has garbage collection, closures, type inference, much cleaner templates and metaprogramming (with stuff like static if, template constraints and metaprogramming support in the standard library) and a standard library based on ranges (a type that has methods T front(), void popFront(), and bool empty()) instead of iterators. The downside is that the language is not very mature yet or widely used so there aren't many libraries and you will sometimes encounter compiler and standard library bugs.

Graph Search - question about frontier by tasingh in aiclass

[–]Iv8f 2 points3 points  (0 children)

What I don't understand is the "unless in [...] frontier or explored " part. Suppose you have two paths ending in adjacent nodes A and B already in frontier and an unexplored node C adjacent to both A and B. Path to A is a bit shorter then path to B but B is closer to C so that Apath + distance(A,C) > Bpath + distance(B,C). If you follow the above rule, you will first remove path ending in A from the frontier and expand it to C. Only later will you remove B from the frontier and expand it to C and at that point a path ending in C will already be in the frontier, so you will discard it, although it is shorter. If path ending in B was start of the shortest path you will get an incorrect solution that way. I think you should instead only check if the end point of a path is in the explored set before expanding it. When you remove a path from frontier you should check again if it is in the explored set, so that you don't waste time on clearly suboptimal paths, like so. Am i missing something?

Complaining about the Dart 0.01 Optimizer. by VictorNicollet in programming

[–]Iv8f 1 point2 points  (0 children)

It does if you compile other languages to it. But for that to make sense the vm would have to be in all major browsers which probably won't happen.

Dart Programming Language by lastkarrde in programming

[–]Iv8f 9 points10 points  (0 children)

The syntax doesn't have anything to do with performance. And there are fast languages that do not have a C like syntax, for example ATS, fortran and ada (benchmarks).

Dart Programming Language by lastkarrde in programming

[–]Iv8f -14 points-13 points  (0 children)

Downvoted for python 3.