Tetris NEAT AI

Hi,
the goal is to train an AI to play Tetris using NEAT and then be playable against.

Currently i'm looking around at possibilities how to do this. My incomplete computer science education makes me try to do this as efficient and fast as possible, so i'd like to code it in C++ rather than Python, JavaScript etc.
So i looked around and stumbled upon Orx, which looks like the fastest candidate as much as i can tell :D

Did some of the Beginner Guide, skim-read some of the tutorials and tried to get a basis running.

Currently, i am stuck. My idea was to create a standalone windows game and also looked into the corresponding tutorial, but i couldn't figure out how to set up (a possibly minimalistic) VS 2017 Projekt in which i can use Orx and Scroll (since this appears to be what i'll need).
I'm not that well experienced with coding, but i figure i'll need one of the orx.dll/orxd.dll/etc files in the project? What about the orx.h etc?

By the way, do you guys think that Orx actually is a solid option? I'm not even 100% sure how to implement the entire thing, but it's a hobby project, so i have time :D

Comments

  • Hi @SunSh4dow and welcome here.

    Currently, in order to use orx + Scroll, there's some manual setup to be done. However your timing is quite interesting as someone else just went through it and we discussed it over the chat at https://gitter.im/orx/orx

    You can follow the simple way of using init.bat to create your basic orx project (you'll have everything there ready except Scroll itself) and simply copy the Scroll header files on top of it (there are a handful of tutorials on Scroll in the wiki as well).
    We do have plans of supporting the creation of new Scroll projects with init, so that should be coming soon-ish as well. In the meantime, I'd recommend poking sausage or trsh on the chat as they're probably your best resource to help you getting started with that endeavor.

    That being said, I'm quite biased of course, but I do think orx is quite a solid option to make a 2D computer game (including Windows) if C/C++ doesn't scare you. ;)

  • edited March 2019

    Hi SunSh4dow, Orx is certainly fast, so you're on the right track there.

    The simplest way to get yourself a working VS2017 project is to use the "init" script. This script creates projects for you.

    The guide for that is here: http://orx-project.org/wiki/en/tutorials/creating_your_own_project

    After following this, you should have a project for your tetris game. Let me know how you get on. We are trying to cater more and more for beginners so let us know if there is anything you can't find.

    Wayne

  • Aye, i used the init batfile, but the resulting project looks different than the 10_Locale.cpp used in the Localization Tutorial (which eventually leads to the Scroll Tutorial), which in turn looks more like something i could use to code the functionality of Orx extremely close to the interaction of and with NEAT. I might just have misinterpreted the differences though

  • Yes, so you have a choice here, use init to give a standard orx project, or (because scroll isn't in init yet) convert it manually to a scroll project using: http://orx-project.org/wiki/en/tutorials/creating_your_own_scroll_project_using_init

    The scroll option would be my preference using object oriented programming.

    Let me know how this document goes for you. If there are discrepancies, it would be good for me to fix those up.

  • edited March 2019

    The differences mostly stem from about a decade between when 10_Locale.cpp was written and init was added.
    That temporary tutorial is quite neat, however I wonder if we should direct people to add the new include path inside the premake script instead and re-run premake. That would work with any building environment. What do you think @sausage ?

  • Yes it would be good to have consolidated path.

Sign In or Register to comment.