132 Matching Annotations
  1. Nov 2018
    1. comm.Send([data, MPI.INT], dest=1, tag=77)

      Capital functions are lcosest to their C equivalent

    1. denote the density at states0after transitioning forttime steps from statesbyp(s!s0;t;). We also denotethe (improper) discounted state distribution by(s

      WHat the hell does the density mean in RL setting?

  2. Oct 2018
    1. The abstraction layer passes its commands to the Device Driver, a software communication layer to the hardware. This layer is entirely invisible to the developer, since it cannot be interacted with through your program. Like many invisible things (remember the bacteria), the device driver is one of the most important parts of the Software Pipeline, since it connects all of the individual pieces together. Because of the amount of specialized functionality that the Device Driver encompasses, it can be quite large in file size.

      Driver just means code to communicate between software and hardware

  3. Jul 2018
    1. . Personal status affair

      They get so much power from this clause

    2. . It has the right to dissolve the Chamber of Deputies at the request of the president of the republic if the chamber refuses to meet throughout an ordinary or a special session lasting no less than one month, even though it is summoned twice consecutively, or if the chamber sends back the budget in its entirety with the purpose of paralyzing the government. This right may not be exercised again for the same reasons which called for dissolving the chamber in the first instance.

      Can president still do this today?

    1. Alawite 0 2

      Crazy how they still exist

    2.      Azm Movement (4)

      MIkati still has political influence

    3.      Union Party (1)      Popular Nasserist Organization (1)

      Lebanon still has some nasserists

  4. Jun 2018
    1. iven a set ofpolicies and their value functions{Vi(s),πi(a|s)}ki=1, a compositepolicyΠ(a|s)can be constructed using a Boltzmann distribution

      softmax over the appropriate model

    2. ideal learning-based animation system should allow an artistor motion capture actor to supply a set of reference motions for style,and then generate goal-directed and physically realistic behaviorfrom those reference motion

      What do these reference motions look like exactly?

    1. Operating income     22,326 (b)(c)     20,182 (d)(e)     18,161 (g)     27,759       26,764 (i) Net income

      is this a low operating cost?

    1. A data handler, which is an interface to a set of data, A strategy, which generates a signal to go long or go short based on the data, A portfolio, which generates orders and manages Profit & Loss (also known as “PnL”), and An execution handler, which sends the order to the broker and receives the “fills” or signals that the stock has been bought or sold.

      Can modeling stocks be done using RL

    2. The latter offers you a couple additional advantages over using, for example, Jupyter or the Spyder IDE, since it provides you everything you need specifically to do financial analytics in your browser! With the Quant Platform, you’ll gain access to GUI-based Financial Engineering, interactive and Python-based financial analytics and your own Python-based analytics library. What’s more, you’ll also have access to a forum where you can discuss solutions or questions with peers!

      Check out more details about this business and whether it's profitable

    1. Take a look at the video:

      Two main contributions are taking a reference motion and early termmination to imitate complex actions. Reward is difference to simulation at each frame

    1. torch.Tensor is the central class of the package. If you set its attribute .requires_grad as True, it starts to track all operations on it. When you finish your computation you can call .backward() and have all the gradients computed automatically. The gradient for this tensor will be accumulated into .grad attribute.

      Given taht each step involves some linear algebra + calculus, autograd can compute the backprop of that function automatically

  5. www.codeslinger.co.uk www.codeslinger.co.uk
    1. The decoding is performed (good compilers) through an access to a jump table. Just one memory access (tests) needed.

      good compilers wont turn a switch statement into a bunch of if conditions.

      Switch is more efficient when theres lots of opcodes

    2. CPU emulator: Binary Translation.

      Difference between interepreted vs compiled emulation

    1. Whereas standard policy gra-dient methods perform one gradient update per data sample, we propose a novel objectivefunction that enables multiple epochs of minibatch updates.

      Proximal policy optimization is just RL with minibatches

  6. May 2018
    1. .2. TORCS Car Racing Simulat

      Sounds like a good kind of environment to leverage

    1. From TensorBoard, you will see the summary statistics: Lesson - only interesting when performing curriculum training. This is not used in the 3D Balance Ball environment. Cumulative Reward - The mean cumulative episode reward over all agents. Should increase during a successful training session. Entropy - How random the decisions of the model are. Should slowly decrease during a successful training process. If it decreases too quickly, the beta hyperparameter should be increased. Episode Length - The mean length of each episode in the environment for all agents. Learning Rate - How large a step the training algorithm takes as it searches for the optimal policy. Should decrease over time. Policy Loss - The mean loss of the policy function update. Correlates to how much the policy (process for deciding actions) is changing. The magnitude of this should decrease during a successful training session. Value Estimate - The mean value estimate for all states visited by the agent. Should increase during a successful training session. Value Loss - The mean loss of the value function update. Correlates to how well the model is able to predict the value of each state. This should decrease during a successful training session.

      Nice summary of talking points of ML model from a hyperparameter engineering standpoint

    1. Victory isn't the right word. Plot number of apples caughts vs number of epochs

    2. Given an input vector consisting of S and A, the neural net is supposed to predict the value of Q(S,A) equal to the target: R + γ * max Q(S’,A’).

      Simplest explanation ever of deep RL

    3. Good chess players are very good at estimating future rewards in their head. In other words, their Q-function Q(S,A) is very precise.

      Immediate reward doesn't take any intelligence. Can just brute force, state space won't be that big

    1. rBody.velocity = new Vector2(rBody.velocity.x, jumpSpeed);

      It's crazy how this just works

    2. isSwinging

      where are these booleans coming from?

    3. if (groundCheck)

      what does groundcheck mean?

    4. var force = perpendicularDirection * swingForce;

      where does swing force come from?

    5. // 2 - Inverse the direction to get a perpendicular direction Vector2 perpendicularDirection; if (horizontalInput < 0) { perpendicularDirection = new Vector2(-playerToHookDirection.y, playerToHookDirection.x); var leftPerpPos = (Vector2)transform.position - perpendicularDirection * -2f; Debug.DrawLine(transform.position, leftPerpPos, Color.green, 0f); } else { perpendicularDirection = new Vector2(playerToHookDirection.y, -playerToHookDirection.x); var rightPerpPos = (Vector2)transform.position + perpendicularDirection * 2f; Debug.DrawLine(transform.position, rightPerpPos, Color.green, 0f); }

      Should put this in its own function

    6. Circular controls

    1. The Hinge Joint 2D is slightly different from the last two. This specific joint lets a GameObject with a Rigidbody rotate around a fixed point

      Used for grappling hook

    1. vec2 bl = step(vec2(0.1),st); // bottom-left vec2 tr = step(vec2(0.1),1.0-st); // top-right color = vec3(bl.x * bl.y * tr.x * tr.y);

      wtf wow

    2. // Each result will return 1.0 (white) or 0.0 (black). float left = step(0.1,st.x); // Similar to ( X greater than 0.1 ) float bottom = step(0.1,st.y); // Similar to ( Y greater than 0.1 ) // The multiplication of left*bottom will be similar to the logical AND. color = vec3( left * bottom );

      Can do boolean logic with continuous functions like this

    1. Here are some tools that will make it easier for you to visualize these types of functions. Grapher: if you have a MacOS computer, type grapher in your spotlight and you'll be able to use this super handy tool. OS X Grapher (2004) GraphToy: once again Iñigo Quilez made a tool to visualize GLSL functions in WebGL. Iñigo Quilez - GraphToy (2010) Shadershop: this amazing tool created by Toby Schachman will teach you how to construct complex functions in an incredible visual and intuitive way.

      AWesome tools

    2. Smoothstep

      Similar to sigmoid

    3. The following code structure is going to be our fence. In it, we visualize the normalized value of the x coordinate (st.x) in two ways: one with brightness (observe the nice gradient from black to white) and the other by plotting a green line on top (in that case the x value is assigned directly to y). Don't focus too much on the plot function, we will go through it in more detail in a moment.

      "st" are texture coordinates, with "s" being the along the horizontal axis into the texture, and "t" being the vertical. One major stumbling block with graphics is that you'll find lots of one letter names. "xyz" represents locations in the world, whereas "st" represents locations along a surface area. "uv" is also sometimes used for texture coordinates. There is a difference between them, but it's not interesting or relevant to a beginner. Just know that both are in use.

      I would guess that "pct" is an abbreviation for "percent", given that it ranges from 0.0 to 1.0. It's definitely a poor choice of variable name.

    4. Definition of color shader

    1. Voxelman is an example that shows how to use the new Entity Component System with Unity in an extreme way. Each voxel in the scene is instantiated as an entity, and controlled by component systems. It also utilizes the C# Job System, the Burst Compiler and the asynchronous raycast to hit the maximum efficiency of multi-core processors.

      I wonder if this works in an actually performant way to have my character and/or enemies react this way

    1. vv<math xmlns="http://www.w3.org/1998/Math/MathML"><mstyle displaystyle="true"><mi> v </mi></mstyle></math> refers to the speed of the object movin

      More speed gives a lot more drag

    2. …and add it to our “forces” example, where many objects experience wind, gravity, and now friction: Your browser does not support the canvas tag.

      Friction is why balls don't bounce forever (even if gravity existed)

    1. velocity.add(acceleration); velocity.limit(topspeed);

      Acceleration: rate of change of velocity Velocity: rate of change of position

  7. Apr 2018
    1. Adding Some MovementSo far all of our effects have been static. We can do a lot more interesting things by making use of the inputs that ShaderToy gives us. iGlobalTime is a constantly increasing variable; we can use it as a seed to make periodic effects. Let's try playing around with colors a bit:

      sines and cosines are cyclical so perfect for animations

    1. As always, check the Unity Profiler for memory allocations.

      Check a tutorial

    2. And the better approach just came to my mind. I went to add a script ran in compile-time which mission is to search through all prefabs in the project (in the Assets directory) to check all their renderers for a linked material whose name ends with _desktop(.mat). If found, then it replaces that reference link with its _mobile.matcounterpart that should have been added by the artist

      Figure out how to build for mobile vs desktop and how assets and textures need to be changed for each

      Easy solution is to have two different projects or 3 different git repos (extra one for common utilities)

    3. Approximately 50k triangles, 170 draw calls, 70mb textures, 45mb RT, 140 shadow casters. Not bad. Probably we have too many shadow casters and draw calls for mobile, but nothing too crazy. We might consider reducing the amount of draw calls but it might be a safer bet to find other real bottlenecks.

      Figure out how to get this screenshot, render docs or unity?

    4. coming from Desktop. However, that figure dropped tremendously when making actions such as building roads; that is, we get FPS spikes likely coming from CPU (scripts).

      Unity scripts are CPU bound - how to access GPU from unity?

    5. Effectively, we were extensively using standard shaders and also custom shaders that were never thought for mobile.

      Use mobile specific shaders for mobile - figure out how to dynamically set this in unity

    6. I duplicated the scene, baked the lighting, made some code changes to the process followed to determine which was the scene to load and made thousand fixes, nothing fancy. After turning them off I instantly got +5 FPS, not bad for a 20 minutes task (10 of them being deployment). Still, there is a long way to go to achieve a performant main menu.

      To improve image rendering performance on mobile, removed post processing effects and then pre baked lighting as opposed to keeping it dynamic

    1. In ocular physiology, adaptation is the ability of the eye to adjust to various levels of darkness and light. The human eye can function from very dark to very bright levels of light. However, in any given moment of time, the eye can only sense a contrast ratio of roughly one millionth of the total range. What enables the wider reach is that the eye adapts its definition of what is black.

      Great for long hallways

      Metal gear solid 3 also had a great version of this

    1. Motion Blur is a common post-processing effect that simulates the blurring of an image when objects filmed by a camera are moving faster than the camera’s exposure time. This can be caused by rapidly moving objects or a long exposure time. Motion Blur is used to subtle effect in most types of games but exaggerated in some genres, such as racing games.

      Can be used to make things feel faster than they are

    1. Depth of Field is a common post-processing effect that simulates the focus properties of a camera lens. In real life, a camera can only focus sharply on an object at a specific distance; objects nearer or farther from the camera will be somewhat out of focus. The blurring not only gives a visual cue about an object’s distance but also introduces Bokeh which is the term for pleasing visual artifacts that appear around bright areas of the image as they fall out of focus.

      Depth field effect seems pretty essential for making beautiful and powerful shots

    1. Vertex and Fragment Shaders are required if your Shader doesn’t need to interact with lighting,

      So what are they good at?

    1. elieve that the often sad-state of gamer culture comes from these kinds of interactions being the primary way you connect to your fellow humans in a virtual world. What’s lacking is a way to meaningfully cooperate with strangers, even with unshared goals, and when you have that trust can exist between strangers and build overtime it turns it into a much different kind of connection.

      Find ways of creating interactions that are not necessarily violent between players

    1. ransform.rotation = Quaternion.LookRotation(-directionToCamera, Vector3.up);

      Use this rotation when an object needs to face another object

    1. Can generate levels by coping googl maps data and styling it differently

    1. his idea was stolen from flickr (remember flickr?) who, I think, stole it from del.icio.us (now gone)—who knows, anyway, the point is, tags were the new hotness and made Stack Overflow work great.

      Borrowed tagging idea from flickr

    1. Adding Steam Controller support is something that happens outside of Unity. What you do is create a game that supports KBM or a standard controller (ideally both) and create a preset for the Steam Controller from within Steam's Big Picture mode. The SC isn't a regular controller. When you plug it in, it acts as keyboard, mouse and generic controller at once and has to be configured with a proper preset. So rather than adding SC support to your game, you add support for your game to the SC. It's the other way around.  

      Interesting. How do I test steam controller locally without having submitted to steam store

    1. Oh, lots. In addition to the instructive change in the nature of the game from two players to three, Carcassonne is a territory-acquisition game with no combat mechanism at all. Tactical combat is arguably overused in computer gaming, so much so that a multiplayer game that doesn't feature it seems almost like a different kind of creature.

      create a mutliplauer gane w/o combat

    2. Ticket to Ride is essentially about connecting points on a graph. All games are ultimately abstract simulations, although sometimes the thing simulated is itself abstract. Computer gaming has been going in two primary directions as of late: in action games, towards greater simulation of reality (or projected reality), and in casual and role-playing games, towards lip-service to realism while grafting on increasingly arbitrary rule systems.

      ttr has a good theme

    3. 7. Pente

      Look this game up again

    1. Realizing that game-ending conditions other than winning could be discarded entirely was an amazing insight, and possibly marks the origins of the structure seen in 95% of games to this day: play until death, then send the player back to a checkpoint or previous save. While most of these games will boldly declare "Game Over" when the player runs out of health, considering you can always resume from the last checkpoint it's really not over at all. It's arguably an overused design now, but it wasn't back when Pitfall II did it.

      Pitfall 2 introduced checkpoints

    1. In other words: they used a pseudo-random generator, seeded with set values tied to each sector of game world, to algorithmically create terrain and contents.

      Skyrim had computer generated content

    2. Additionally, there was the Haste spell, which doubled a character's actions and movement for a short time, but at the cost of a year of permanent aging

      Interesting mechanic

  8. Mar 2018
    1. Save the image below and add it into your project folder. Don’t worry about the background being black, Unity will make it transparent.

      How does unity do this?

    1. 2,644 online playing 117,909 free games! Kongregate

      Can come here for ideas

    1. Gounki

      Get to the other side first

      Half of the pieces move diagonally, the other half vertically. They can be stacked to move like chess queens

      Stacking to gain new powers is a pretty interesting mechanic

    2. Shogi

      Chinese chess with more interesting promotions and mechanics. Pieces arent killed but are captured and then controlled by teh capturing player

    3. Army of Frogs

      Like hive without cool powers

    4. Tablut

      Viking chess with asymetric goals

    1. is does not, however, solve the problem of how the virtual world shouldappear to the eye. Rather than moving the eye in the virtual world, we need tomove all of the models in the virtual world to the eye’s frame of reference

      Relativistic concept

    2. x-shear

      What does a shear mean exactly?

    3. ond part involves how each partof the model should appear after taking into account lighting sources and surfaceproperties that are defined in the virtual world. This is

      This part is called rendering

    4. If you are using a high-level design tool, such as Blender or Maya, to make yourmodels, then coherent models will be automatically bui

      Coherent model is one where the distinction between interior and exterior isn't as clear

    5. Figure 3.3: Part of a doubly connected edge list is shown herefor a face thathas five edges on its boundary. Each half-edge structureestores pointers to thenext and previous edges along the face boundary. It also stores a pointer to itstwin half-edge, which is part of the boundary of the adjacentface. (Figure from

      Definition of double connected edge list

    1. Sweeney writes in The Unreal Networking Architecture: “The Server Is The Man”.

      Read t his

    2. . The problem with this is that if each player were able to simply tell the server “here is my current position” it would be trivially easy to hack the client such that a cheater could instantly dodge the RPG about to hit them, or teleport instantly behind you to shoot you in the back.

      Anti cheat software is a bigger issue now because game code is no longer solely on server side

    3. The final limitation occurs because of the way the game synchronizes by sending just the command messages which change the state. In order for this to work it is necessary for all players to start from the same initial state. Typically this means that each player must join up in a lobby before commencing play, although it is technically possible to support late join, this is not common due to the difficulty of capturing and transmitting a completely deterministic starting point in the middle of a live game.

      Lobbies are almost required by design

    1. STUN, ICE and TURN support for NAT traversal and packet forwarding in the worst case.

      What the fuck is this about?

    2. A key feature of QUIC is support for multiple data streams. New data streams can be created implicitly by the client or server by increasing the channel id.

      Can create multiple connections to server to send data in parallel but each parallel connection is still subject to head blocking

    3. How this works in practice is that each game develops their own custom protocol on top of UDP, implementing basic reliability as required, while sending the majority of data as unreliable-unordered.

      Not all messages need to be sent reliably in games

    4. HTTP is built on top of TCP, a low-level protocol which guarantees data sent over the internet arrives reliably, and in the same order it was sent.

      Short definition of TCP and HTTP

    1. |>

      What is this operator called?

    2. | Worker of Person | Manager of Employee list

      Where are worker and manager defined here?

    1. human subjects are involved, thisbecomes extremely challenging. How many subjects are enough? What happensif they adapt to the experiment? How does their prior world experience affectthe experiment? What if they are slightly sick the day that they try the exper-iment? What did they eat for breakfast? The answers to these que

      VR experiments need to consider user physiology

    2. Stevens’ power lawOne of the most known results from psychophysics isSteven’s power law, which characterizes the relationship between the magnitud

      Pain vs experienced pain follows an exponential rather than linear growth

    3. Consider the JND for a stimulus with varying magnitude, such as brightness.How does the JND itself vary as the magnitude varies? This relationship is cap-tured byWeber’s law

      Many physical phenomena have formulas for when changes are perceptible

    4. otally, the same seems to be true ofexperienced video game players. Those who have spent many hours and days infront of large screens playing first-person shooter games apparently experience lessvection when locomoting themselves in VR.

      gamers experience less motion sickness in VR since they've looked at screens more often

    5. ProprioceptionIn

      Sensation of knowing how far your muscles have moved away from you

    6. also likely to emerge. For example, one might be targeted forimmersive cine-matography while another is geared toward engineering design. Which compo-nents will become more like part of a VR “operating system” andwhich willbecome higher level “engine” componen

      OS for VR is still an open problem so there's an opportunity that exists

    7. To conclude with hardware, Figure 2.12 shows the hardware components forthe Oculus Rift DK2, which became available in late 2014. In the lower leftcorner, you can see a smartphone screen that serves as the display. Above that isa circuit board that contains the IMU, display interface chip, a USB driver chip,a set of chips for driving LEDs on the headset for tracking, and a programmablemicrocontroller. The lenses, shown in the lower right, are placed so that thesmartphone screen appears to be “infinitely far” away, but nevertheless fills mostof the field of view of the user. The upper right shows flexible circuits thatdeliver power to IR LEDs embedded in the headset (they are hidden behind IR-transparent plastic). A camera is used for tracking, and itsparts are shown in the

      VR hardware is surprisingly simple

    1. o make an object appear to be stationary while you moveyour sense organ, the device producing the stimulus must change its output tocompensate for the motion. This requires sensors and tracking systems to becomepart of the VR system. Co

      VR tracking is almost by definition a must

    2. imagine many “games of life” where you might not get as far without being in the“proper” group.

      This idea has extremely interesting potential for storytelling

    3. n also havea social experience.Imagine having “movie night” with your friends from around the world, whileyou sit together in the virtual movie theater. You can even have the thrill ofmisbehaving in the theater without getting thrown out.

      Many social experiences can fundamentally be changed with VR

    4. ough less understood,grid cellseven encode locations in amanner similar to Cartesian coordinates [13] (Fi

      Brain forms connections with places regardless of whether they're in the real world or virtual reality

    5. erminology regarding various “realities”The termvirtual realitydatesback to German philosopher Immanuel Kant [23], although itsuse did not involvetechnology. Its modern use was popularized by Jaron Lanier in the 1980s.

      Original proposers of VR ideas

    1. theVRNinja team made use of Unreal Engine 4’s ray tracing functions. By calculating a direct line between where the player is looking and an in-game object in the path of that ray, they were able to define where players were focusing their attention and for how long. This “focus time” detection was used in the level selection menu. To navigate between the game’s levels, players can look at a level, represented by a hovering picture frame, and then teleport to that new location.

      can interact with menus only by looking into VR

      Think about new rules of design in this environment

    1. No sign-up: the faster the consumer can get to the product, the better Does one thing well: as opposed to a million things not so well It’s free: who doesn’t love free stuff?

      What makes a website popular

    2. “Heroku actually has a great example of this in 12factor.net where it's clearly tied to Heroku,” he says. “But it's not a Heroku.com property. There's a lot of these.”

      Fake third party channels are good ways to seed interest in some content

    3. Find influencers in your segment and figure out how you can work with them. When you publish, @ them on Twitter or GitHub to encourage them to share your content with their wider networks

      Make friends in game design online

    1. The Principles of Modern Game AI by Alex J. Champandard  on  April 17, 20152016-02-24T10:17:48+00:00

      This whole website looks like a gold mine but seems to be down

    1. A good place to start for cover selection is to implement a scoring mechanism for neighboring locations. You can add different heuristics to rank the cover points as necessary, and the actor will always try to pick the best.

      Finding good cover is a ranking problem

    2. Most actors require the following behaviors: Reacting to weapon fire by looking surprised for a short amount of time. Assuming a intermediate position to search for cover, e.g. like dropping down on one knee. Playing a short animation while looking for cover, and signaling the threat to team mates. Moving swiftly but carefully into the most appropriate position, Or alternatively, lying down on the spot for protection.

      List of animations required to handle a unit being shot at in an FPS where cover is a mechanic

    1. In fact, most of the advanced techniques used in mainstream development today originate from AI research: Knowledge representation Relational databases Search algorithms Finite state machines Rule-based systems

      Many advanced AI techniques ended up in mainstream and are now considered part of computer science

    1.     ball_pos_x += ball_dir_x * ball_speed;     ball_pos_y += ball_dir_y * ball_speed;

      Make ball go in its intended direction

    2. // keycodes #define VK_W 0x57 #define VK_S 0x53

      Symbolic name for keyboard/mouse controls

    3.    glutPostRedisplay();

      Force window redisplay

    4. GetAsyncKeyState

      Windows specific function

    5.     glBegin(GL_QUADS);

      draw quadrilateral

    6. float racket_right_x = width - racket_width - 10;

      this seems like it would be common enough of a technique to use when placing GUI elements on the screen

    7. glutTimerFunc(interval, update, 0);

      call this every x = interval milliseconds

    8.     glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);

      GLUT DOUBLE: double buffered window GLUT RGB: RGB colors GLUT_DEPTH: Cache z-values

    9.     glutInitWindowSize(width, height);

      Params passed in here

    10. All we have to do to make OpenGL and GLUT work are two things:
    11. int _tmain(int argc, _TCHAR* argv[])

      tmain is a windows only thing, when I tried to understand it from a SO answer my head hurt

    12. #pragma comment(lib, "OpenGL32.lib")

      Compiler directive