Code Monkey home page Code Monkey logo

cocoa-game-of-life's People

Contributors

raruler avatar alanquatermain avatar

Watchers

James Cloos avatar Dr. Bertrand Caron, PhD avatar

cocoa-game-of-life's Issues

Detecting Stationary States

Mathematically speaking

A sufficient condition to know whether we have reached a stationary state is the equality of two frames population. The periodicity if then defined as the distance between the two closest identical frames.

Implementation

We can't check at every step that the frame is different to every over frame ever generated (which implies logging the whole trajectory). We can work with a periodicity cut-off of nFrames which are kept in memory, and find a necessary condition which is way less computer-intensive than checking the exact equality of two frames.
First idea would be checking numberOfLiveCells:

Inquiry Scalability

Context

When reaching a gridSize greater than a few thousands, the display gets really bad and the frame rate drops.

Question

Is the display limiting, or is the engine ? Can a OpenCL/GPU Rendered game of life engine give us better scalability ? Or it is just a matter of improving/changing the display engine ?

Source :

Time Profiling

(Not accounting for __CFRunLoopDoTimers 11.5%)

  • The drawing is the limiting factor : [CellView drawRect:] takes more than 90% of computing power (which is furthermore limited to a single core).
    • Just disabling grid drawing seems to double frame rate
    • Why is the grid redrawn at every step ?
  • Maybe only readrawing cells that have changed (requires a memory of the system, which we were gonna implement anyway [#1]).

timeprofile

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.