News for hackers. Stuff that matters.
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by pplonski86 on Wednesday July 01, 2020 @03:41AM (#23698889)
Off-topic. I'm thinking about building a game where players are controlling real robots. The players compete for resources which are randomly distributed in the land. In the first version of the game it will be on the Earth. This game can be later used to help colonize Moon and Mars.

Do you know any robots which can be used in such game?

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by milgrim on Wednesday July 01, 2020 @04:13AM (#23699108)
You probably heard of Isotopium: Chernobyl. Interesting concept and a solid implementation of a similar idea.

https://youtu.be/TET-xQIgZQE

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by danvoell on Wednesday July 01, 2020 @09:46AM (#23701250)
Nope never heard of it. That is amazing.
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by glaberficken on Wednesday July 01, 2020 @07:24AM (#23700259)
wow had no idea something like this existed. thanks for the tip
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by pplonski86 on Wednesday July 01, 2020 @06:21AM (#23699894)
Amazing! Thank you
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by thdrdt on Wednesday July 01, 2020 @10:22AM (#23701638)
Looks like this is what Bret Victor is promoting for years: a real-time feedback loop with your code and the outcome.

This would also be very nice for game development as Bret Victor demonstrated multiple times.

great!

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by tlb on Wednesday July 01, 2020 @11:03AM (#23702151)
I'm greatly inspired by his work. It seems magical for game design.

Game engines like Unity also let you tweak a lot of things interactively, but more by making those things be assets rather than code. But I never really liked that style. (For that matter, I don't like CSS being separate from the page content either.)

So I want Dynamicland for robots.

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by memexy on Monday July 06, 2020 @03:05PM (#23751513)
This is a really great idea

> The compiler extracts anything marked as a parameter into a separate data structure, with a link to the location in the source code they came from. When the IDE renders the Yoga code, it shows the parameters as sliders.

Turning code into data that can be represented in another way. I guess the idea is from projectional editors, where the code is projected onto different representations depending on the context and what the user wants to accomplish.

Does anyone know of other work along similar lines? Programming the robot is also cool and I'm curious if this idea can be applied to other types of programming where a simplified projection of the program can make code more accessible to non-programmers.

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by sangfroid_bio on Tuesday June 30, 2020 @08:35PM (#23696448)
How does the differentiable programming implementation work?
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by tlb on Tuesday June 30, 2020 @08:47PM (#23696534)
Yoga is purely functional, so it's possible to use backpropagation to compute it efficiently.

It actually compiles 2 versions of each function: call them foo and foo.grad. foo.grad takes the same arguments as foo, and also a gradient for each output argument. It then computes gradients for each input argument.

The algorithm is simple: traverse the expression tree in the usual order you'd use for emitting code, and remember the order. Then traverse in reverse order, propagating gradients as you go.

The tedious bit is writing the gradients for every built-in op. For an operation like + it's simple: each argument gets the same gradient as the result:

  void ExprAdd::backprop(YogaContext const &ctx, GradientExprSet &grads, ExprNode *g)
  {
    grads.addGradient(ctx, args[0], g);
    grads.addGradient(ctx, args[1], g);
  }
For something like divide it's a bit grosser:

  void ExprDiv::backprop(YogaContext const &ctx, GradientExprSet &grads, ExprNode *g)
  {
    // https://en.wikipedia.org/wiki/Quotient_rule
    grads.addGradient(ctx, args[0], ctx.mkExpr<ExprDiv>(g, args[1]));
    grads.addGradient(ctx, args[1], ctx.mkExpr<ExprNeg>(
      ctx.mkExpr<ExprMul>(g,
        ctx.mkExpr<ExprDiv>(
          args[0],
          ctx.mkExpr<ExprPow>(
            args[1],
            ctx.mkExpr<ExprConstDouble>(2.0))))));
  }
More at https://gitlab.com/umbrellaresearch/yoga2/-/blob/master/jit/... if you're curious.
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by sangfroid_bio on Tuesday June 30, 2020 @08:52PM (#23696578)
Have you considered using an off the shelf differentiable programming implementation? Or are the requirements for real-time applications too demanding for existing software?
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by tlb on Tuesday June 30, 2020 @08:56PM (#23696601)
I looked at a few systems but didn't think any of them would work.

The real-time requirement is fairly hard. The robots I work on use a 1 kHz feedback loop, so it has 1 mS in which to recalculate everything.

Caffe is pretty efficient if you can supply batches of values, but the overhead is high when running real-time.

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by EquallyJust on Tuesday June 30, 2020 @09:24PM (#23696740)
have you tried torchscript w/ the C++ interface?
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by tlb on Tuesday June 30, 2020 @09:36PM (#23696800)
No. It looks promising. I should try it.
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by sangfroid_bio on Tuesday June 30, 2020 @09:47PM (#23696851)
I think Tensorflow with Swift or Rust bindings may also work.
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by mistrial9 on Wednesday July 01, 2020 @12:02PM (#23702981)
has umbrellaresearch considered changing yoga to a different name ? start with my +1
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by moorage on Tuesday June 30, 2020 @08:18PM (#23696364)
Okay I'm 100% biased, but this is something I've enjoyed working with as well. It's made developing a self-balancing greppy super easy :)
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by CodeWriter23 on Tuesday June 30, 2020 @09:27PM (#23696760)
The robot’s name seems to imply it can find specific items in a cluttered closet. Is that the case?
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by moorage on Wednesday July 01, 2020 @02:38AM (#23698447)
That's what the googley eyes are for! Ideally, this isn't the only "greppy" design (:
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by pbhjpbhj on Wednesday July 01, 2020 @06:51AM (#23700069)
Oh man, I need this. Also for finding stuff in a cluttered [my] brain.
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by ilovefood on Wednesday July 01, 2020 @05:29PM (#23706940)
This is amazing. I love the concept of remote programmable robotics and the real-time feedback of the controls is a great idea. I think this is the way forward, I wasted countless hours trying to fiddle with code only to see the robot failing on the edge of breaking apart. Any indications on how to build my own Greppy and the whole infrastructure behind it? :)
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by moorage on Wednesday July 01, 2020 @06:59PM (#23707833)
Curious about your use case! Do you want to setup your own warehouse for you and your own friends? Or use the existing Yoga warehouse and get your own personal Greppy on it that only a subset of people can share? Or something else?
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by ilovefood on Wednesday July 01, 2020 @07:15PM (#23707985)
I would love to understand how the whole thing works actually and how it can be configured/updated. Surely this approach can be adapted to smaller robots? It's more of a curiosity question since I love to tinker with robots and am looking for a good way to make them better. Apart from didactic purposes I don't have a really specific use case yet. :)
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by moorage on Wednesday July 01, 2020 @10:10PM (#23709223)
Yoga is a language as well as an environment, so if the robot has an open controller where a compiled program can be installed, it will work!

What robot did you want to tinker with

Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by gumby on Wednesday July 01, 2020 @11:46AM (#23702749)
By the way Trevor is a founder of YC
Re:Show HN: Program “Greppy”, a 2-wheeled robot, using a new... by zubairq on Wednesday July 01, 2020 @08:50AM (#23700765)
I love this creepy robot!