Coder Social home page Coder Social logo

goodai / brainsimulator Goto Github PK

View Code? Open in Web Editor NEW
285.0 52.0 62.0 91.37 MB

Brain Simulator is a platform for visual prototyping of artificial intelligence architectures.

Home Page: https://www.goodai.com/brain-simulator

License: Apache License 2.0

HTML 20.54% CSS 0.01% C# 74.56% Batchfile 0.14% Cuda 4.13% C++ 0.31% XSLT 0.02% PowerShell 0.02% GLSL 0.18% Smalltalk 0.02% Python 0.08% Lua 0.01%
brain-simulator cuda machine-learning ai

brainsimulator's Introduction

GoodAI Brain Simulator

New with School for AI (read more here: http://blog.marekrosa.org/2016/12/goodai-releases-school-for-ai-new_1.html).

Brain Simulator is a collaborative platform for researchers, developers and high-tech companies to prototype and simulate artificial brain architecture, share knowledge, and exchange feedback.

The platform is designed to simplify collaboration, testing, and the implementation of new theories, and to easily visualize experiments and data. No mathematical or programming background is required to experiment with Brain Simulator modules.

Please keep in mind that Brain Simulator and all included modules are still in the PROTOTYPE STAGE OF DEVELOPMENT. GoodAI will continuously improve the platform based on its own research advancement and user feedback.

System Requirements

Running Brain Simulator requires an NVIDIA CUDA-enabled graphics card and 64-bit Windows. More specifically, the requirements are:

  • 64-bit Windows 7, 8, 8.1 or 10
  • .NET Framework 4.5
  • NVIDIA graphics card with CUDA support (compute capability 3.0 or higher)

Building Brain Simulator

To build Brain Simulator, open the Sources/BrainSimulator.sln solution in Visual Studio 2015 Update 3. You need to have NVIDIA CUDA 8 installed.

To build the School and School GUI modules, open the Sources/Modules/School/School.sln solution and build the SchoolGUI project.

brainsimulator's People

Contributors

cireneikual avatar hemedroid avatar honzakpp avatar honzasinkora avatar janmachac avatar jaroslavvitku avatar jirihroza avatar jstrunc avatar maroslav avatar martinbalek avatar martinbrazdil avatar martinpoliak-goodai avatar matejnikl avatar orest553 avatar peterhrosso avatar petrkoupy avatar philiphilm avatar premekpaska avatar vegardli-kswh avatar vlasy avatar vojtechjelinek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brainsimulator's Issues

[ERROR] Error occured during simulation: ErrorInvalidValue: This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.

just writing this to help others, when running brainsimulator, I got this error:

[ERROR] Error occured during simulation: ErrorInvalidValue: This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.

While running simulations, compiled and installed. It was due to having 2 NVidia cards, one 670 and one K20c. To solve this, you have to instruct NVidia to use only one card, in my case I use my K20c, this can be done through the NVidia control panel->Manage 3d Settings-> Select the brainsimulator program, and choose the correct card.
attached is the screen shot of the error, and the solution.
nvidiasolution

nvidia error

Uploading nvidiasolution.gif…

also, using NVidia version 7.5

Port from CUDA to OpenCL

Hello there,

I saw this very interesting and innovative software, but apparently it is limited to the proprietary nvidia cuda sdk.
Porting to OpenCL would enable everyone to run the software, which is very important if you want the software to gain traction and be use by a lot of researchers/users.
I know this will involve a lot of work. However, I am convinced using an open standard will benefit the project enormously in the long term.
You cannot simply ignore 20% of your potential users.

Error on startup

When I attempt to start Brain simulator, an error message appears saying "An error occured while initializing simulation. Please make sure you have a supported CUDA-enabled graphics card and appropriate drivers. Technical details: InitializationFailed: Initialization of CUDA failed." I have successfully been using CUDA on this computer (windows 7, graphics card GT 420m) for some time (mostly Theano and other gpu-accelerated python stuff). Is there anything I can do to fix this, or any diagnostic information I could provide to help you help me/help you correct whatever bug is causing this?

MyProjectRunner.RunAndPause blocks indefinitely

You have a thread deadlock in MySimulationHandler, the m_worker_DoWork never signals that it's complete after reaching the m_stepsToPerform target. This is due to the WaitUntilStepsPerformed function blocking the thread that is supposed to signal the m_worker_RunWorkerCompleted event.

Unable to compile the brain simulator

Hi guys, It has been long time since I used VS and am having the following missing dependencies error
The type or namespace name 'OpenTK' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'YAXLib' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'ManagedCuda' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'ICustomSerializer' could not be found (are you missing a using directive or an assembly reference?)

Missing library in solution

It is not possible to rebuild solution, current version missing library (assembly):

*BEPUphysics
*BEPUutilities
*CudaBlas
*CudaFFT
*OpenTK
*YAXLib
...

Unable to reproduce tutorial (observers not working)

I was attempting to follow through the Brain Simulator tutorial, but I encountered some problems.

  1. No observers work. At all. They go from "box with red cross in it" to "box with white box in it", but that's all they do.
  2. If observers are present, then the program runs for a few steps when told to run, then pauses. If no observers are present, it runs at thousands of steps per second as expected.
  3. (separate issue)(note: the tutorial used MNIST world) The arrow from the 'bitmap' input said it had a dimension (if that's what the number in the middle of the arrow from one thing to another means) of 784, as expected, but the arrow from 'label' said it had a dimension of 1, whereas in the tutorial video it said 10.

Now, this may all be my own fault and unresolvable on your part. As CUDA 7 fails to install on my machine, I am using CUDA 7.5, and got the dlls that Brain Simulator needs by downloading and unpacking, but not installing, CUDA 7, then copying over the four relevant dlls (I encountered the same level of functionality by just renaming the relevant CUDA 7.5 dlls to end in _70 rather than _75, but that isn't saying much.). If this is the problem, I'll just wait until either Brain Simulator supports CUDA 7.5 properly or I have access to another machine.

Cannot find *.ptx files

While trying to load .brain project files in to the simulator, cannot find *.ptx file exception is thrown. Where are these files?

On which branch to fix Spelling Errors

Title is topic. As you might have seen I have fixed _standart_ in a few places, creating pull-requests all over the place. This wasn't very thought through, so I stopped after the third or fourth PR.
I noticed I pushed one to master and one to develop. While no real issue by itself, it might in a rare occurence disturb Gits workflow (no expert, just imagining the worst).

So my question: On which of those two branches is a direct file-edit from the GitHub-Website best made?

In my personal fork of the BrainSimulator-Repository I think I now found out how to not spam PRs but instead create a single big one, but I do not always have easy access to it (for example on other computers).

How to run Brain Simulator on an 'older' pc

I received the following error after I installed Brain Simulator using the installer and ran an example.
Observer update failed: ErrorOperatingSystem: This indicates that an OS call failed.

Therefore, I cloned the repo (and ran git submodule update --init) to obtain sources. My notes to put Brain Simulator into operation on my PC and a bug that I found follow.

My PC: Win 10 64-bit Pro with VS Pro 2013 Update 5,
NVIDIA GeForce 610M, Compute Capability 2.1, Driver Model WDDM,
CUDA Toolkit 7.5

After I opened the main project file BrainSimulator\Sources\BrainSimulator.sln, BasicNodesCuda group was not able to load in VS due to different CUDA Toolkit (7.5 vs. developed on 7.0).

Therefore,

  1. Edit BrainSimulator\Sources\Modules\BasicNodes\Cuda\BasicNodesCuda.vcxproj (right click on the unloaded group in VS):
    (line 163)
    (line 299)
  2. Reload and build the project. It installs the libraries.
  3. Install ManagedCuda 7.5 - x64 via Manage NuGetPackages
    Now, Brain Simulator should run.

However, I needed to solve another issue. It seems that CUDA/OpenGL interoperability does not work in my setting. It is needed for a visualization of data, e.g. MatrixObserver uses CUDA kernel to 'draw' a matrix into a buffer that is then rendered by OpenGL.
It is interesting that interoperability runs well in CUDA C/C++ Samples that uses glut. Nevertheless, ManagedCuda fails on system call of nvcuda.dll that tries to register a GL buffer in a CUDA context.
My fix is simple (but a little inefficient). A new CUDA buffer is created instead of registering of GL buffer. The CUDA buffer is then copied in the GL buffer after kernel finishes.

Even though I was not able to run some samples due to the error Out Of Resource by launching a kernel, e.g. DrawMatrixKernel. According to CUDA_Occupancy_calculator.xls, The CUDA compiler attempts to minimize register usage to maximize the number of thread blocks that can be active in the machine simultaneously. If a program tries to launch a kernel for which the registers used per thread times the thread block size is greater than N, the launch will fail.
The size of N on GPUs with compute capability 1.0-1.1 is 8192 32-bit registers per multiprocessor. On GPUs with compute capability 1.2-1.3, N = 16384. On GPUs with compute capability 2.0-2.1, N = 32768. On GPUs with compute capability 3.0, N=65536.

It means that maximum threads per block is decreased to 704 due to the fact that DrawMatrixKernel uses 44 registers on my gpu. However, Brain Simulator tries to run each kernel with constant MaxThreadsPerBlock of the current GPU. The bug is in MyKernelFactory.cs after loading a kernel (line 47).
The fix: MAX_THREADS = m_kernel.MaxThreadsPerBlock;

The same issue is in MyLSTMFeedForwardTask + kernel GetNetInput in LSTMFeedForwardKernel.cu that contain maxThreadsCount=1024 implicitly.

Hope that this helps to someone.

AI Interaction

ONe Thing up front:
I love the project and I am really interested in AIs, however I am not an expert.
SO My question/Proposal is a module anabeling AI's to share knowledge through communication enabling them to solve multiplayer tasks. I believe that communication is the most crucial thing for the human society.

Deathlymad, an interested developer

P.S.:I am wonder if you would allocate a CUDA shared memory sedction and let two AIs Read/Write to if if they would be able to figure out how to communicate with ach other.

Installation Issue System.DllNotFoundException in CudaRand.dll

I am trying to run BrainSimulator with release version 0.6.0 on my machine but have the following error:

An exception of type 'System.DllNotFoundException' occurred in CudaRand.dll but was not handled in user code

System Details:
Windows 10 64 bit
CUDA 9.2
Visual Studio 2015 Enterprise Edition.

Can not find School for AI on the view menu even after compiling the code manually

Hi there, I cant find the school for AI option on the view menu no matter what I do, I even tried compiling the code for the module myself and copying the module files to the Module directory on my brain simulator installation, I can see the SchoolWorld option on the world list but cant find a way to open the School for AI window. I would appreciate if you could give me an installer with school for AI working on it or if you could help me compiling the code so I can have it, I'm looking forward to use this awesome piece of code. Thanks for the time and have a good day.

Can't open solution in Visual Studio 2015 Community

The projects BasicNodesCuda and XmlFeedForwardNetCuda don't load, showing the error in the output:
BrainSimulator\Sources\Modules\BasicNodes\Cuda\BasicNodesCuda.vcxproj : error : One or more errors occurred.
BrainSimulator\Sources\Modules\XmlFeedForwardNet\Cuda\XmlFeedForwardNetCuda.vcxproj : error : One or more errors occurred.

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.