dj3hut1

Member
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

106 Neutral

About dj3hut1

  • Rank
    Member
  1. Hello, i have an idea for another algorithm, which takes benefit of the parallel gpu processing. If your texture is a POT ( power of two )-texture and has a size of n x n the algorithm requires log_2(n) passes. You can write a shader which takes as input the texture of the previous pass and renders to a texture ( via FBO ) with size n/2 x n/2. In the (pixel) shader you do nothing more than calculating the min-max values for the current 4 neighbour texels and write them to the r and g-color channel for instance. The most difficult thing would be to calculate the correct texture coordinates. This is repeated until your target texture has a size of 1x1 ;) dj3hut1 P.S. : Maybe you need 2 shaders : one for the first pass ( a greyscale image as input ) and one for the remaining passes ( a 2 component image as input )
  2. OpenGL Too many extensions...

    Hello, Quote:My view is, ignore extensions and life is great. I think not all extensions can be completely ignored, even in GL 3. F.e. one of the most useful extensions is anisotropic texture filtering, which for some reason never made it into the core of opengl. dj3hut1
  3. converting int to const char*

    Hello Lith, you can also use sprintf ( from <cstdio> ). char buf[80]; sprintf( buf, "%d", number );
  4. Multiagent System

    Hello CzarKirk, maybe JADE is what you have searched for : http://jade.tilab.com/ I've heard of it in an AI lecture, but have never used it... dj3hut1
  5. C++ IDE's?

    Hello, I'm using the Eclipse IDE ( even for OpenGL ). At the beginning i had also compiler errors, but if you configure everything right it works. Here are some tips for setting up your C++-Project for Eclipse right. I'm using it with MinGW. * First, download and install MinGW Then setup the properties of your project : * C/C++ Build -> Tool Chain Editor : Select 'MinGW GCC' as toolchain and 'GNU Make Builder' as current builder * C/C++ Build : select 'External Builder' as Builder type * C/C++ Build -> Environment : If it's not there, add a variable 'PATH' with the MinGW bin directory as value ( f.e. 'D:\MinGW\bin' ) * C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Directories : If it is neccessary, add the 'include' path of your project * C/C++ Build -> Settings -> Tool Settings -> MinGW C++ Linker -> Libraries : If it is neccessary, add the MinGW 'lib' directory in 'Library search path' (f.e. 'D:\MinGW\lib') and other 'lib' directories, if you work with other external libraries. * C/C++ Build -> Settings -> Tool Settings -> MinGW C++ Linker -> Libraries : Add the libraries you want to work with under 'Libraries' ( f.e. glew32s, openglut, glu32, opengl32, ... ). Tip : if you have a lot of libraries to add to your project, edit the .cproject file in the project directory directly. As additional step copy the executable from the 'Release' dir back into your main path : C/C++ Build -> Settings -> Build steps -> Post Build Steps -> Command : 'copy yourproject.exe ..' That was enough for me to get a simple C++-Project to work. Good Luck :)
  6. tic tac toe with minimax

    Hello, i dont't know if it changes something, but you should change if((grid[x + 1][y] == state) && (x < 2)) to if((x < 2) && (grid[x + 1][y] == state)) and so on...
  7. Best AI programming language?

    Quote:Original post by alvaro Quote:Original post by dj3hut1 Hello, why not use a logic programming language like Prolog or a constraint logic programming language? ( f.e. http://eclipse-clp.org/ ) And why would you? Prolog is good for solving search problems like the AI for chess. The advantage is, that you don't have to code the algorithm, you must only declare the problem in the right way. And a CLP is even more beneficial, because you have the ability to restrict the search space with the help of simple constraints.
  8. tic tac toe with minimax

    i think your index in the for loop is not right. you need something like : tempBoard.input(lm[2*i], lm[2*i+1], player);
  9. Best AI programming language?

    Hello, why not use a logic programming language like Prolog or a constraint logic programming language? ( f.e. http://eclipse-clp.org/ )
  10. tic tac toe with minimax

    Hello Antonym, if you are in a state, where the board is full or one player has won, you have to evaluate it, say -1 if your opponent win, +1 if you win and zero if there is no winner. Then if all final states are evaluated you calculate backward the value for every possible move. If your opponent has to move, he tries to minimize the value ( so -1 is the best for him ) whereas your aim is it, to maximize. So if your are back in the initial state of the board you know which moves are the best to take...