Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: TillB
  • Order by date
  1. TillB

    Function varibales vs. extern variables Optimization Problem

    Hi Norbert, The algorithm I'm using is pretty well known as MiniMax algorithm. Ther is indeed a optimization called Alpha-Beta-Search, which cuts of alot! I try to implement this strategie for a connect4 game which in general has 6 rows and 7 columns one could put a stone into. (7 possible...
  2. TillB

    Function varibales vs. extern variables Optimization Problem

    Thank you for your answer :) Yes "max" calls "min" and "min" calls "max". It simulates something like this: I choose the move that is best for me (max) and then my oponent chooses his move that is worst for me (min) and then I choose the best move for me again (max) and so on. It simulates that...
  3. TillB

    Function varibales vs. extern variables Optimization Problem

    So actually the variable playingField will be the same for every recursive call, and will not be replaced.
  4. TillB

    Function varibales vs. extern variables Optimization Problem

    let me try to clarify this. Basically I have two options: module ai function makeYourTurn(_playingField) Integer :: makeYourTurn Integer, dimension(:,:) :: _playingField makeYourTurn=max(0, _playingField) end function makeYourTurn recursive function max(searchDepth...
  5. TillB

    Function varibales vs. extern variables Optimization Problem

    Thx for the fast reply. I probably will implement both versions and mesure the time. Im not sure about a non recursive version though xD. Would be pretty hard to do that. What I'm doing here is a MiniMax algorithm (http://en.wikipedia.org/wiki/Minimax) finding the best move for an AI Player...
  6. TillB

    Function varibales vs. extern variables Optimization Problem

    Hi, this is my first post here so I hope I do everything right. Im trieing to optimize my fortran95 code and I stumbled over something I couldnt solve with google or the forum search here. Maybe I dont now the right keywords to search for. Given an recursive function that could be called...

Part and Inventory Search

Back
Top