Skip navigation

Discrete mathematics

warning: Creating default object from empty value in /var/www/vhosts/ on line 33.

This is a cross post from my personal development blog , about a day or two spent jamming on path finding.

I enjoy messing with path finding algorithms and finding interesting ways to obtain the results, this is about a few more recent attempts.

Your rating: None

I am a recent high school graduate, who has been programming in C++ since I was 11. I know x86 Assembler, C/C++ and Java. I won't be learning anything new in CS for the first 2-3 semesters in college. The introduction class, algorithms and data structure classes are prerequisites for the rest of the CS curriculum. I have already taken Data Structures and Algorithms this past year, which was the practical, implementation approach. I am currently watching the algorithms class on MIT OCW to get a grasp of the more theoretical aspects. And I can say that I am understanding it; it's just a bit dry. This summer, I will be watching the multivariable calculus, intro to algorithms and Physics III lectures through MIT OCW. I have had experience in robotics through FIRST; I personally wrote an implemented my interpretations of the PID controller and Kalman Filter, but that's about it. I have followed the first week or two of the Udacity Robot Car class, but never really followed through. What fun thing can I do during summer? Euler's Project is on the list, writing an Android app is on the list. Perhaps, I can really dive into parallel processing through the use of my PS3. But those are all "practical" things.

What can I be doing to learn the more theoretical aspects of CS? To be honest, I really don't know much of what happens on the theoretical side of CS.

submitted by davidthefat
[link] [38 comments]

Your rating: None

Hi all,

I'm a soon to be college graduate with a math major, comp sci minor, and statistics minor. I am looking for something interesting and related to comp sci to learn this summer. I hope whatever I study to be very interesting, and also improve my programming ability and problem solving ability.

Here are my ideas so far

  1. Learn Haskell. I've never done anything functional, and I hear Haskell is interesting and makes you a better programmer.

  2. Learn C. Haven't really done any low-level stuff.

  3. Algorithms. I took an algorithms class, but it wasn't too rigorous.

  4. Machine learning 5. Natural language processing. (These seem interesting)

  5. Set theory and databases (My job next year will be working with databases)

I'd appreciate any input on what seems like the most interesting or what other suggestions you have. (Don't suggest Project Euler, I do that already).


Edit: Thank you everybody! I think I'm going to learn a functional language, and that functional language will be Scheme (or Racket), as I found sicp to be more awesome than the Haskell resources. In conjunction with this, I'll be continuing project euler, and picking up emacs. Thanks for the advice!

submitted by cslmdt
[link] [78 comments]

Your rating: None

This update I believe is worth a second post, as it makes visible the otherwise-mysterious algorithms producing music in our previous post.

And yes, I believe this is “music,” naysayers aside. Whether it’s good music is in the ears of the listener, but if you can describe this much sound with this little code, imagine what’s really possible in computer music. Whatever it is you want to hear, it’s within the power of your imagination to describe it, on a score or in code, either one.

Thanks to none other than Stephan Schmitt for the tip.


Your rating: None

For this homework you will implement a simple distributed hill-climbing algorithm and test its behaviors on various graphs. The goal is for you to become proficient at using the NetLogo link primitives and to gain first-hand experience with the problems and benefits of distributed hill-climbing algorithms.

  1. Read the link primitives section of the NetLogo manual.
  2. Implement a NetLogo model that generates a random graph, by using a simple algorithm: first create num-nodes nodes (a slider), then create num-nodes * edge-ratio edges, each one connected to two randomly chosen nodes.
  3. Implement another button which instead generates the graph using preferential attachment. Specifally: first create num-nodes nodes, then create num-nodes * edge-ratio edges, each one created by picking two nodes chosen with a probability proportional to their degree (number of incident edges). For example, if there are 3 nodes, one with two edges and the other two with one edge each (the graph is a line) then the one with two edges gets chosen with probability 2 / 4 = 1/2, while each other two nodes is chosen with probability 1/4. The denominator is always the total number of edges and the numerator is the degree for that node.
  4. Implement a num-colors slider and randomly color the nodes using that many colors.
  5. Implement a layout button which calls one of the built-in NetLogo layout methods to make the graph look pretty.
  6. Implement a basic hill-climbing algorithm. On each tick every node looks at the colors of its neighbors and changes its color to one that does not conflict with any. If there is no such color then it will change to one that minimizes the number of constraint violations with its neighbors (min-conflict heuristic). If at any tick none of the nodes changes its color then we stop since a coloring has been found.
  7. Add a test button which performs a more extensive test. Specifically, for the given number of nodes and edge ratio, it will generate 100 graphs of random and preferential attachment types and run the hill climbing algorithm, plotting the number of time steps it took to find a solution in a histogram, one for random and one for preferential attachment. You will need to set an arbitrary large number for the 'does not stop' case.

Add your name and describe your results in the model description tab. Email me you .nlogo file by Wednesday September 21 @9am.

Your rating: None

Welcome to a series of blog articles about my experiment (read: stumbling around) of marrying data-oriented, memory-streamlined behavior trees with a second representation to ease creation and modification during development. I write it to document my findings and decisions and to ask for your invaluable feedback to build a BSD licensed BT toolkit that is truly useful.

Article Updates

  • March 10, 2011 – Added a reference to the second article in my behavior tree experiment blog series.
  • March 05, 2011 – Posted this article on my own blog, too.
  • March 02, 2011 – Reader eric wrote a fantastic behavior tree feature analyzation in the comments section. Don’t miss it!
  • February 24, 2011 – added a reference section to the end of the article with additional references not found in the text.
  • February 24, 2011 – added a section to show the advantages of behavior trees over finite state machines based on a question by snake5.


Behavior trees (BTs) are deployed by more and more game AI programmers to implement reactive decision making and control of the virtual creatures entrusted to them as’s Alex Champandard notes in his retrospective for 2010 and outlook for 2011.

What is a behavior tree and how does it tick

My view and understanding of behavior trees has been fundamentally shaped by  Alex Champandard’s tutorials and online masterclasses on Alex behavior tree definition is very elaborate and detailed. Other great online resources about behavior trees in games are Damian Isla’s Gamasutra article about the AI in Halo 2, Max Dyckhoff’s  presentation about Decision Making and Knowledge Representation in Halo 3, and Ricard Pillosu’s  Coordinating Agents with Behavior Trees slides about their use in Crysis.  Joost van Dongen blogs about the role behavior trees play in Swords and Soldiers here and here.

Your rating: None

Running Large Graph Algorithms: Evaluation of Current State-Of-the-Art and Lessons Learned

Google Tech Talk February 11, 2010 ABSTRACT Presented by Dr. Andy Yoo, Lawrence Livermore National Laboratory. Graphs have gained a lot of attention in recent years and have been a focal point in many emerging disciplines such as web mining, computational biology, social network analysis, and national security, just to name a few. These so-called scale-free graphs in the real world have very complex structure and their sizes already have reached unprecedented scale. Furthermore, most of the popular graph algorithms are computationally very expensive, making scalable graph analysis even more challenging. To scale these graph algorithms, which have different run-time characteristics and resource requirements than traditional scientific and engineering applications, we may have to adopt vastly different computing techniques than the current state-of-art. In this talk, I will discuss some of the findings from our studies on the performance and scalability of graph algorithms on various computing environments at LLNL, hoping to shed some light on the challenges in scaling large graph algorithms. Andy Yoo is a computer scientist in the Center for Applied Scientific Computing (CASC). His current research interests are scalable graph algorithms, high performance computing, large-scale data management, and performance evaluation. He has worked on the large graph problems since 2004. In 2005, he developed a scalable graph search algorithm and demonstrated it by searching a graph <b>...</b>

More in
Science & Technology

Your rating: None