Search Results

Search found 5119 results on 205 pages for 'genetic algorithm'.

Page 8/205 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Minimax algorithm: Cost/evaluation function?

    - by Dave
    Hi guys, A school project has me writing a Date game in C++ (example at http://www.cut-the-knot.org/Curriculum/Games/Date.shtml) where the computer player must implement a Minimax algorithm with alpha-beta pruning. Thus far, I understand what the goal is behind the algorithm in terms of maximizing potential gains while assuming the opponent will minify them. However, none of the resources I read helped me understand how to design the evaluation function the minimax bases all it's decisions on. All the examples have had arbitrary numbers assigned to the leaf nodes, however, I need to actually assign meaningful values to those nodes. Intuition tells me it'd be something like +1 for a win leaf node, and -1 for a loss, but how do intermediate nodes evaluate? Any help would be most appreciated.

    Read the article

  • How to implement a Digg-like algorithm?

    - by Niklas
    Hi, How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows: Users submit content Other users view and vote on the content (assume 90% of the users only views content and 10% actively votes up or down on content) New content is continuously submitted How do I implement an algorithm that calculates the "hotness" of a submitted item, preferably in real-time? Are there any best-practices or design patterns? I would assume that the algorithm takes the following into consideration: When an item was submitted When each vote was cast When the item was viewed E.g. an item that gets a constant trickle of votes would stay somewhat "hot" constantly while an item that receives a burst of votes when it is first submitted will jump to the top of the "hotness"-list but then fall down as the votes stop coming in. (I am using a MySQL+PHP but I am interested in general design patterns).

    Read the article

  • Algorithm to create a linked list from a set of nodes

    - by user320587
    Hi, I am looking for an algorithm to create a linked list from a set of nodes. For example, let's assume a node is an airline ticket from a source point to destination. (e.g., Chicago to Detroit) and there are several airline tickets. Assuming all these airline tickets are jumbled, what is the best way to determine the entire journey path. If there are 5 airline tickets like Chicago-Detroit, Denver-Chicago, Detroit-DC, DC-New York, San Jose-Denver, the algorithm should be able to come up with the correct start to end path. San Jose - Denver - Chicago - Detroit - DC - New York

    Read the article

  • Fastest Algorithm to scale down 32Bit RGB IMAGE.

    - by Sunny
    which algorithm to use to scale down 32Bit RGB IMAGE to custom resolution? Algorithm should average pixels. for example If I have 100x100 image and I want new Image of size 20x50. Avg of first five pixels of first source row will give first pixel of dest, And avg of first two pixels of first source column will give first dest column pixel. Currently what I do is first scale down in X resolution, and after that I scale down in Y resolution. I need one temp buffer in this method. Is there any optimized method that you know?

    Read the article

  • algorithm to use to return a specific range of nodes in a directed graph

    - by GatesReign
    I have a class Graph with two lists types namely nodes and edges I have a function List<int> GetNodesInRange(Graph graph, int Range) when I get these parameters I need an algorithm that will go through the graph and return the list of nodes only as deep (the level) as the range. The algorithm should be able to accommodate large number of nodes and large ranges. Atop this, should I use a similar function List<int> GetNodesInRange(Graph graph, int Range, int selected) I want to be able to search outwards from it, to the number of nodes outwards (range) specified. So in the first function, I expect it to return the nodes placed in the blue box. The other function, if I pass the nodes as in the graph with a range of 1 and it starts at node 5, I want it to return the list of nodes that satisfy this criteria (placed in the orange box)

    Read the article

  • Algorithm to detect no movable pieces in Stratego.

    - by maleki
    I am creating a Stratego Game and am having trouble creating an algorithm that can detect when there are no more possible moves because all your pieces are gone or the remaining pieces are unmovable or trapped by forbidden squares, unmovable pieces, or other trapped pieces. For simplicity you can think of the board as an array of Squares which can contain pieces. Square[][] gameBoard = new Square[10][10] Squares have easily checkable state such as hasPiece(), hasEnemyPiece(), hasUnMovablePiece(), hasMoveablePiece(), isBlocked(). It would also probably be nice if this algorithm wasn't run every time a player moved but maybe checked in the beginning and then only certain conditions were checked when the player moved.

    Read the article

  • Best Allocation Algorithm

    - by shaju
    Hi, I am looking for a best allocation algorithm for the below scenario. We have requirement for say 18 pieces. I have the stock in my shelf as follows. Bin A - 10 Bin B - 6 Bin C - 3 Bin D - 4 Algorithm should propose the bins in the following order Bin A(10) , Bin D (4), Bin C (3) Real scenario we have n number of bins with different quantities.We need to find the optimal combination. Objective is to maxmize the allocation quantity. Can you please help. Regards, Shaju

    Read the article

  • Implement a RSA algorithm in Java

    - by Robin Monjo
    Hello everyone. I want to implement a RSA algorithm to encrypt an image (byte[]). To generate my two keys I used this piece of code : KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA"); keygen.initialize(512); keyPair = keygen.generateKeyPair(); Once public and private key are generated, I would like to show them to the user so he can distribute the public key and use the private key to decode. How can I get back those key? Using keygen.getPrivateKey() and keygen.getPublicKey() give me all the information of the RSA algorithm, not only the keys I need. Thanks

    Read the article

  • Partial sorting algorithm

    - by Enriquev
    Hello, Say I have 50 million features, each feature comes from disk. At the beggining of my program, I handle each feature and depending on some conditions, I apply some modifications to some. A this point in my program, I am reading a feature from disk, processing it, and writing it back, because well I don't have enough ram to open all 50 million features at once. Now say I want to sort these 50 million features, is there any optimal algorithm to do this as I can't load everyone at the same time? Like a partial sorting algorithm or something like that?

    Read the article

  • Algorithm to calculate a page importance based on its views / comments

    - by stacker
    I need an algorithm that allows me to determine an appropriate <priority> field for my website's sitemap based on the page's views and comments count. For those of you unfamiliar with sitemaps, the priority field is used to signal the importance of a page relative to the others on the same website. It must be a decimal number between 0 and 1. The algorithm will accept two parameters, viewCount and commentCount, and will return the priority value. For example: GetPriority(100000, 100000); // Damn, a lot of views/comments! The returned value will be very close to 1, for example 0.995 GetPriority(3, 2); // Ok not many users are interested in this page, so for example it will return 0.082

    Read the article

  • All possible combinations of n items selected randomly from a set of x items (algorithm)

    - by SubPortal
    I have a set of x string items e.g("A","B","C","D","E","F") I need to know the formula that calculates how many combinations of n items and what is the algorithm that generates all possible combinations e.g if we need to select 4 items from the list randomly. those 4 items could be: ("A","B","C","D") or ("A","B","C","E") or ("A","B","C","F") or ("A","B","D","E") ...etc I need the formula that calculates how many sets of items will be generated without repetition, that is we consider ("A","B","C","D") as one of the resulted combinations we cannot consider the same items as another resultant combination with replacing the positions of the items in the set like ("A","B","D","C") Also I need the algorithm that generates all possible combinations in any programming language. [C#,VB.NET,Java,C++] Thank you for any help.

    Read the article

  • What "already invented" algorithm did you invent?

    - by Guy
    In my question Insert Update stored proc on SQL Server I explained an efficient way of doing an insert/update - perhaps THE most efficient. It's nothing amazing but it's a small algorithm that I came up with in a mini-Eureka moment. Although I had "invented" it by myself and secretly hoped that I was the first to do so I knew that it had probably been around for years but after posting on a couple of lists and not getting confirmation I had never found anything definitive written up about it. So my questions: What software algorithm did you come up with that you thought that you'd invented? Or better yet, did you invent one?

    Read the article

  • Anyone has implemented SMA* search algorithm?

    - by Endy
    I find the algorithm description in AIMA (Artificial Intelligence: A Modern Approach) is not correct at all. What does 'necessary' mean? What is the memory limit? The queue size or processed nodes? What if the current node has no children at all? I am wondering if this algorithm itself is correct or not. Because I searched the Internet and nobody has implemented it yet. Thanks.

    Read the article

  • What is an s2k algorithm?

    - by WilliamKF
    What is the definition of an s2k algorithm? For example, "PBKDF2(SHA-1)" is an s2k algorithm. Here is some Botan code that refers to s2k: AutoSeeded_RNG rng; std::auto_ptr<S2K> s2k(get_s2k("PBKDF2(SHA-1)")); s2k->set_iterations(8192); s2k->new_random_salt(rng, 8); SymmetricKey bc_key = s2k->derive_key(key_len, "BLK" + passphrase); InitializationVector iv = s2k->derive_key(iv_len, "IVL" + passphrase); SymmetricKey mac_key = s2k->derive_key(16, "MAC" + passphrase); Also, what is a 'salt' in s2k?

    Read the article

  • 500px.com Ranking Algorithm

    - by alex
    I was recently wondering how http://500px.com calculates their "Pulse" rating. The "Pulse" is a score from 1..100 based on the popularity of the photo. I think it might use some of the following criteria: Number of likes Number of "favorites" Number of comments Total views maybe the time since the photo has been uploaded maybe some other non-obvious criteria like the users follower count, user rank, camera model or similar How would I achieve some sort of algorithm like this? Any advice on how to implement an algorithm with this criteria (and maybe some code) would be appreciated too.

    Read the article

  • Algorithm to generate radial gradient

    - by user146780
    I have this algorithm here: pc = # the point you are coloring now p0 = # start point p1 = # end point v = p1 - p0 d = Length(v) v = Normalize(v) # or Scale(v, 1/d) v0 = pc - p0 t = Dot(v0, v) t = Clamp(t/d, 0, 1) color = (start_color * t) + (end_color * (1 - t)) to generate point to point linear gradients. It works very well for me. I was wondering if there was a similar algorithm to generate radial gradients. By similar, I mean one that solves for color at point P rather than solve for P at a certain color (where P is the coordinate you are painting). Thanks

    Read the article

  • fast algorithm implementation to sort very small set

    - by aaa
    hello. This is the problem I ran into long time ago. I thought I may ask your for your ideas. assume I have very small set of numbers (integers), 4 or 8 elements, that need to be sorted, fast. what would be the best approach/algorithm? my approach was to use the max/min functions. I guess my question pertains more to implementation, rather than type of algorithm. At this point it becomes somewhat hardware dependent , so let us assume Intel 64-bit processor with SSE3 . Thanks

    Read the article

  • algorithm for image comparison

    - by Rajnikant
    Please consider following use case, I have one bigger image, lets called is master image. Now from some where else, I am getting one small image. I want to check whether this small image is subset of master image or not. important points are, smaller image might have different file format, smaller image might captured from comparatively different view. smaller image may have different light intensity. At this stage of algorithm/computation advancement, which level of accuracy I could expect? Any algorithm/open source implementation that would have such implementation? Thanks, Rajnikant

    Read the article

  • Need an algorithm to group several parameters of a person under the persons name

    - by QuickMist
    Hi. I have a bunch of names in alphabetical order with multiple instances of the same name all in alphabetical order so that the names are all grouped together. Beside each name, after a coma, I have a role that has been assigned to them, one name-role pair per line, something like whats shown below name1,role1 name1,role2 name1,role3 name1,role8 name2,role8 name2,role2 name2,role4 name3,role1 name4,role5 name4,role1 ... .. . I am looking for an algorithm to take the above .csv file as input create an output .csv file in the following format name1,role1,role2,role3,role8 name2,role8,role2,role4 name3,role1 name4,role5,role1 ... .. . So basically I want each name to appear only once and then the roles to be printed in csv format next to the names for all names and roles in the input file. The algorithm should be language independent. I would appreciate it if it does NOT use OOP principles :-) I am a newbie.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >