• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

221 Neutral

About Galdred

  • Rank

Personal Information


  • Twitter
  1. Indee,d that is what I planned to do first. One nice property is that it would work well with the zigzaging vertical lines indeed,, but then, I would still have to floodfill to check whether all tiles inside the convex hull are inside the area (by floodfilling?) to see whether it is convex,, no? And it seems slower than just checking the border tiles and check their neighbors (especially since I already had to track them).
  2. I found a way to do it: First of all, tiles that were surrounded by 4 tiles of another region were converted to this region to avoid weird borders, until there was no such tile left. The polygon theorem says that all the angles of a polygon should be clockwise or counter clockwise. In a hexmap, that would translate more or less to: no hexagon that is not in the area should be adjacent to 3 or more hexagons of the area. If we didn't care about the quasi convex corner cases, just checking that no neighbors is close to 3 region hex would be enough, but we also have to make sure our algorithm does not throw away cases we want to keep. One way to do that would be to check that the region does not cross the zigzaging line passing through one of these neighbors:(cf image convex3b.png) In my game, I chose to accept a more lenient check that still result in reasonably shaped areas. (because it works better with the shape of my walls).
  3. I have a set of tiles in an hexagonal coordinate system, and I want to see whether it forms an "almost convex" region. By almost convex, I mean that a square with zigzaging hex edges would still count as convex. The idea is to split non convex regions into convex ones, and merge small regions into larger convex ones. What I don't want is merging a corridor with a room or 2 rooms separated by a wall together. I was thinking about sweeping a line along 2 axis and see whether it goes through any missing tile (in case of diagonal, the check would fail only if both tiles are missing). Would that work? Edit: it wouldn't, as a L or cross shaped area would pass. How can I do it?
  4. Neural Network AI Discussion Group

    Indeed, I was only planning to score the final state for each character when he dies, but that is a good point. Even grading the utility of things accomplished by a given character through his lifetime could be hard to get right compared to only grading the final outcome for the whole team. But I think it would still be "easier" than finding a good metric to grade the utility at each time.
  5. Neural Network AI Discussion Group

    That is a fair point. But trimming the features down to a reasonable level is what we already do with utility functions. So what would be the problem with using ANN to fine tune the contributions of the utility function? Some behaviours could be very hard to grade indeed, but some other not so much (like preventing the player characters from reaching their objective, or inflicting as much damage as possible before dying for a NPC).
  6. I cannot really tell whether tensorflow is the best tool for what you plan to do, but it is easy to get working on Windows actually. https://www.tensorflow.org/install/install_windows Install Python 3.5 if you want gpu acceleration: install CUDA8.0 from nvidia install cuDNN5.1 from nVidia pip install tensorflow then launch python You'll have to check a few dependencies, but that's it. Now, if you want to ship tensorflow with your game and use the C++ API, there is a link to it on this page.
  7. Neural Network AI Discussion Group

      This. People need to remember that we aren't trying to "solve" something here... we are trying to create an experience. Often, that experience needs to include intentionally sub-optimal decisions and intentionally distinct characters. If you are trying to "solve" behavior, you get neither.     But actually, if we were to separate a civilization AI into several subproblems, like: which goal to pursue to reach victory conditions alliances and wars economy, research and production unit task/theater assignment unit micromanagement Using ANN for diplomacy would be horrible, and economy lends itself much better to a search or utility approach, but wouldn't it make sense to use deep reinforcement learning for the unit micromanagement part? It is the one that resembles zero sum board games the most, and its space state is quite huge, but not orders of magnitude larges than go (if we decide to limit it to the immediate surroundings of a unit and not the whole world map). It is also something regular game AI usually has trouble to handle.   No, Giraffe's Elo on CCRL 40/4 is 2411, which is quite mediocre. There are many engines that are hundreds of Elo points stronger, including my own, RuyDos.   Nice! Is there any place where you have documented your work on it?
  8. Neural Network AI Discussion Group

    Actually, I am not so sure. There have been several attempts at using neural networks for chess, and the results are generally poor. I've tried myself without much success. My last attempt was this past weekend, when I tried to train a very simple ANN to learn the value of material imbalances (including subtleties like the strength of the pair of bishops, the loss of value of the bishop with the presence of lots of your own pawns, etc.). I couldn't get it to work better than a few hand-crafted rules, and that seems to always be the story with chess.   I thought Giraffe had achieved reasonable success with a NN based approach. Alphago performed much worse when it relied solely on ML. Combining regular search and ML worked best acording to the deepmind go team. So maybe combining both would also work better for chess. That said, it is also quite possible that raw computation outperforms ML for chess because it lends itself to brute force better.
  9. Neural Network AI Discussion Group

    This is not true for go. All of the strong go programs out there use ANNs, and the best one (AlphaGo) seems to be stronger than any human.   Indeed, Alphago uses a mix of classic AI techniques (Monte Carlo search tree) and ANNs. It could easily have been done with chess too, and it worked in quite a lot of Atari games. No Limit Hold Em Poker heads up too has been beaten by an ANN based AI. The problem is that many games seem much more complex than go, or don't require a killer AI. The games that suffer the most from poor AI would be wargames, and complex strategy games like Civilization, Starcraft and XCOM, but the game state would be so complex that using ANNs for them might be quite difficult (but their "classical" AI is usually not very good either).  It might work but it would be mostly uncharted territory.
  10. Hey, For those interested in a free open source lua engine, I gathered various links to resources on the web to help you get started with moai. Games made with moai: Broken Age SpaceBase DF9 Invisible Inc Why use moai? It is open source, so you don't have to wait for someone else to fix the bugs that might be stopping you, and you can optimize whatever part of the engine you like. Moai is also free, and all you need to do is credit the engine, either in your splash screen, or in the credits. It also allows you to add features at the engine level. lua is awesome to work with. fast, lightweight, with a good C API. And the code written by other is very readable. It is easy to get into. You have very little setup to do before running. It is also natively made for 2D.
  11. I have just started with the AI, so I wrote a simple utility system with arbitrary values. I plan to add an influence map afterwards indeed.
  12. The Los situation is only one of the parameters that will be used. The viability of a tile will be the result of a weighted sum of several factors.   I never said I wanted to move to the tile with the highest number of tiles seen, I merely said that visibility to all "relevant" tiles was important.   The game system would be in the same family as X(-)COM: The reason for this is that if you want an AI agent to defend an objective by overwatch (opening fire during the player's turn), it better had LoS to the path that leads to it and the player can take if the player is either not visible by the agent, or too protected to shoot now. On the other hand, if the AI is willing to protect a VIP, it better put it in a position where it can hardly be seen by the player on its next turn.   So if the AI agent is meant to go on overwatch, the idea would be to run an expected value minimax  search for the possible moves of the player, and try to find positions where as many as these tiles can be covered.   If he is to attack a given target, on the other hand, the best location would be one where he can see the target, while minimizing the number of player agents that can move and shoot him during their turn.   If it is scouting, maximizing the field number of tiles which are currently unknown to the AI is also desirable.
  13. Thank you for your answers.Indeed, both requirements are at odds.    That sounds like a good compromise to me: Cache the results, and start updating the cache during the player turn, as the AI pieces won't move at this time.
  14. Don't present the values as percentage if the skill roll will be anything else than straight: Chance to hit = attack%, chance to avoid a hit = dodge% (so the chance to really hit becomes attack%*(100-dodge%). Otherwise, it makes things confusing.  You can still use a 0-100 scale even if you don't use percentages: 0 is the minimum for a human, and 100 the max, so the values don't seem entirely nonsensical, and attributes ans skills remain within a reasonable range. Then you are free to use whatever formula best suits your need. I have a soft spot for gaussians, because they are more predictable than raw %. In my game, I went with: Skills on a 0-10 scale, roll as many 10 sided dice as stats, and keep the second highest (except if the skill is 0 or 1, then roll 4-skill and keep the lowest). Attack vs dodge is an opposed roll.   I recommend you read the following articles: Dice-Rolling Mechanisms in RPG by Torben Mogensen Treatise on Different Dice-rolling Mechanics on wikidot
  15. I think a game feels grindy when the challenges becomes trivial, but you are still rewarded for it. There are several options to avoid it: 1)You can make costs and rewards exponential, then grinding stuff out won't be a reasonable option (ie: leveling from lvl4 to 5 would cost 3 times as much as leveling from 3 to 4, but lvl 4 monsters would also bring 3 times as much XP).   2)You can also go the XCOM2 way(more or less): There is a global timer, and doing trivial missions  eats as much of the timer as difficult one. But then, it becomes very hard to balance things out (and not put the player in a corner where he cannot win the game, but does not know it before quite some time). If things carry over from one playthrough to the other, avoiding grinding becomes much harder. But you could still go with option 1 and allow the player to jump directly to the difficult part of the dungeon (ie unlock a portal to start directly with monsters level 4 or something like that).
  • Advertisement