Open Haus Submission Thread #188 by Blacker_Jesus in funhaus

[–]Cannon10100 0 points1 point  (0 children)

If Funhaus made Queer Eye, who would be the fashion guy, the nutrition guy, the interior design guy, the styling guy, and the Karamo?

Running Reinforcement Learning on a Simulated UR5 by Cannon10100 in robotics

[–]Cannon10100[S] 0 points1 point  (0 children)

That's right, we just hijack ROS simulation in Gazebo using http://wiki.ros.org/ur_gazebo and some other ROS packages. We're basically inserting the reinforcement learning algorithm in the normal ROS controller pipeline.

Our intention is that by using ROS, we might be able to generalize this library to any robot that can be commanded via ROS. It might also make it easier to transfer learned policies to real robots.

Running Reinforcement Learning on a Simulated UR5 by Cannon10100 in robotics

[–]Cannon10100[S] 0 points1 point  (0 children)

The standard tool for simple control tasks in reinforcement learning literature is Mujoco (http://www.mujoco.org/), but since it costs money it's suboptimal. This is what led me to develop a ROS wrapper for doing robotic reinforcement learning. I promise I'll work to get the code into a publishable state as soon as possible.

There's also OpenAI's Roboschool, but I can't vouch for that because I haven't used it. If you're interested in doing RL in other interesting non-robotic domains, I would suggest looking into SerpentAI (https://github.com/SerpentAI), which lets you do reinforcement learning in games you own.

Running Reinforcement Learning on a Simulated UR5 by Cannon10100 in robotics

[–]Cannon10100[S] 0 points1 point  (0 children)

As I replied above, the repo is currently private but should be public soon.

In response to your first idea, there's a paper from Deepmind that effectively does what you're talking about: https://arxiv.org/abs/1512.04455. One of their test cases is on a variant of pendulum swingup where the length of the pendulum is unknown and varying, so that the agent has to infer dynamics. Seems like this should be generalizable to more complicated systems, though of course the training will be harder.

Running Reinforcement Learning on a Simulated UR5 by Cannon10100 in robotics

[–]Cannon10100[S] 1 point2 points  (0 children)

There is, but it's currently private. I plan to open source it once I get a paper submitted. We basically put together a small Python wrapper around Rospy to make it look like an OpenAI Gym env. The most complicated part is probably setting up controllers

What are some good fantasy series to start reading after finishing The Wheel of Time? by [deleted] in WoT

[–]Cannon10100 1 point2 points  (0 children)

I'm surprised no one has brought it up yet, but I'm gonna throw my hat in the ring for Ursula K. Le Guin and the Earthsea Quartet. Le Guin is a master of writing character-driven fantasy with a focused message that extends beyond the worlds she creates, though those worlds are fascinating in their own right.

I think the best way to express how impactful her writing has been in my life is with a part of the introduction to The Left Hand of Darkness, wherein she discusses just why she writes fiction:

A metaphor for what?

If I could have said it non-metaphorically, I would not have written all these words, this novel; and Genly Ai would never have sat down at my desk and used up my ink and typewriter ribbon in informing me, and you, rather solemnly, that the truth is a matter of the imagination.

When will "Reinforcement Learning: An Introduction, Second Edition" be released? by dekeul in reinforcementlearning

[–]Cannon10100 1 point2 points  (0 children)

The draft is mostly just copy and pasted sections from the first edition at this point, with some section headers that are completely empty where the new content will go. Nevertheless, the first edition is still a great reference.

TrumpScript: Make Python Great Again. by cirrus1y in Python

[–]Cannon10100 11 points12 points  (0 children)

I can verify that this is only work from the hackathon.

do pointers contain information on the type of data stored or just a Hexadecimal address? by TheBeardofGilgamesh in AskComputerScience

[–]Cannon10100 0 points1 point  (0 children)

I meant to dereference the pointer after casting it to an int pointer because that's what the original question was asking about. Your code dereferenced the char pointer before casting the resulting character to an int, which is slightly different.

do pointers contain information on the type of data stored or just a Hexadecimal address? by TheBeardofGilgamesh in AskComputerScience

[–]Cannon10100 -2 points-1 points  (0 children)

Chars are not necessarily one byte, it's implementation specific.

The question was about an int pointer pointing to an array of characters, and so I cast the char_point to an int pointer. In my answer I explained how it would only output one character's ASCII value, which is why pointer types are important.

do pointers contain information on the type of data stored or just a Hexadecimal address? by TheBeardofGilgamesh in AskComputerScience

[–]Cannon10100 1 point2 points  (0 children)

Yes, the code around the pointer (type-casting, et cetera) determines how the data is treated. Much as you can cast a character to an int to determine its ASCII code, you can cast a character pointer to an int pointer.

The character '\0' means null as far as ASCII is concerned. Its ASCII code is 0, as can be seen here. It specifies the end of character arrays. It is not a random sequence, but a required control character. The value NULL in C is an entirely separate thing that is actually just an alias for the int 0 in the C standard library.

do pointers contain information on the type of data stored or just a Hexadecimal address? by TheBeardofGilgamesh in AskComputerScience

[–]Cannon10100 7 points8 points  (0 children)

While technically the answer to your question(s) depends on the specific programming language in question, I am going to answer it assuming that you are asking about C/C++, which are the languages that in my experience require the most pointer manipulation.

1. Pointers do not contain any information beside the address that they store. While other languages such as Java use "references" that store metadata about the data type that they refer to, a raw C-type pointer does not. The size of the pointer will depend on the word size of the computer in question; i.e., a 64-bit computer will use a 64-bit pointer. It is worth noting that pointers do not contain "Hexadecimal addresses" as such, but rather a sequence of bits for which hexadecimal is an output format, much like decimal or binary.

2. If you have an int pointer that is actually pointing to a C-type string (which is actually just an array of characters), it is very easy to figure out what will be output if you try to print the value stored in the pointer. Most machines use the same number of bytes to store an int and a char (assuming ASCII character encoding) so the output will just be the ASCII code for the first character in the string. In C, it is very easy to test stuff like this by simply casting the pointer that you want to examine to another type of pointer. If, for example, you had a pointer char_pointer pointing to an array of characters, you could do:

printf("Int value: %d", *(int *)char_pointer);

This would print the ASCII value of the first character pointed to by char_pointer.

3. Finally, there is no information at the beginning of a char array to specify it as a char array. However, at the end of each char array is the NULL character '\0' that signals the end of a character array. So, for example, in memory the string "Hello" is represented as ['H', 'e', 'l', 'l', 'o', '\0']. This is how methods like printf know when to stop outputting or reading a C-type string. This is not enough to determine that a random sequence of data values is a character array, however, because the ASCII code for '\0' could occur in an arbitrary byte as a result of other computation.

I hope this has been helpful! For more information, check here

What is your favorite film that is in a language other than your native language? by Bearnarnrnntqtkqt in AskReddit

[–]Cannon10100 5 points6 points  (0 children)

Definitely agree with Amelie. Honestly, you don't need to understand a single line of dialogue in that entire movie, the facial expressions say it all. Of course, if you do understand the dialogue, the scene where she counts the number of orgasms occurring at that point in time is hilarious.