 If all coins are thrown towards the player, staying still is an optimal strategy that catches all coins. Can you explain coin movement more precisely? Does player motion affect coin movement? Also, how is the player's motion constrained? Looping movement (e.g. along a circle) would make the problem easier.
 Assuming that the purpose of the game is catching as many coins as possible and that some running around is needed, a straightforward neural network could be a bit too stateless: AI needs to plan what coins should be caught, and in what order, or let go. With n coins on the playfield, there are less than n!*2^n plans and a relatively long time to evaluate them.
 If you really need to use a neural network (homework?) an obvious brute force input choice is the number of coins that will cross each position of the player movement line at each future time (quantized into small bins), plus player position and velocity. You should be able to exploit and enforce translational symmetry along time and possibly space in network structure.
 Home
 » Viewing Profile: Reputation: LorenzoGatti
LorenzoGatti
Member Since 25 Nov 2005Online Last Active Today, 12:56 AM
Community Stats
 Group Crossbones+
 Active Posts 1,635
 Profile Views 9,391
 Submitted Links 0
 Member Title Member
 Age Age Unknown
 Birthday Birthday Unknown

Gender
Not Telling
#5119480 Design of AI for my Game
Posted by LorenzoGatti on 27 December 2013  08:00 AM
#5118055 A diffrent type of rts.
Posted by LorenzoGatti on 19 December 2013  03:26 AM
For example, you could ask for gifted wizards with the effect of making all suitable parents (offduty wizards or just intelligent characters) automatically breed with each other.
After you get enough wizards, you can ask your promiscuous swingers to pair up differently and give you strong and quick warriors for a while, and so on.
#5117271 Using a PID controller for heading, what error value to use?
Posted by LorenzoGatti on 16 December 2013  02:53 AM
You are wrong, the cross product between headings changes sign at 180 degrees (i.e. it correctly chooses the shortest option between turning clockwise or counterclockwise). What happens at 90 degrees is that the cross product magnitude reaches its maximum; and correction for really wrong headings is smaller than for moderately wrong ones. There are two obvious solutions:
 You can use atan2 instead of the cross product to obtain a real difference of angles rather than something that only has the right sign.
 If you also control position (chasing the target, not only turning towards it) the resulting thrust (to turn back) would compensate the reduced torque when the heading is away from the target.
#5116657 Graduation project ideas
Posted by LorenzoGatti on 13 December 2013  04:41 AM
 Crawling textures and jagged edges look as bad today as on the Playstation 1, and they are only marginally less common.
A whole game with adequate antialiasing would be a significant practical advance compared with industrystandard carelessness.
 There is a significant body of existing antialiasing and fake antialiasing techniques to study, implement, compare, and write reports and theses about.
 Antialiasing needs to be tuned for specific objects, scenes, shaders etc. in the game, in many detailed and pragmatic ways, demonstrating attention to details and practical compromises. This kind of work would be much deeper and more mature than implementing something advanced in a tech demo, cutting as many corners as possible, and considering the job done.
 You can collaborate with a gamemaking team, on a real project, but without confusing your contributions with the work of other people too much. If they do X, you do X with good antialiasing; even rejected proposals are perfectly good for your reports and demos.
#5112711 Math terms for NURBS
Posted by LorenzoGatti on 28 November 2013  05:36 AM
Congratulations for picking an egregiously terse and badly explained paper with unusual notation. Don't blame your lack of training too much.I have an application that uses bezier triangle patches to define a hexagonal game board. I am finding that in certain situations the lack of local control provided by bezier surfaces is creating unacceptable visual artifacts. I am now hoping to experiment with triangular NURBS surfaces to see if I can solve some of these issues.
I found a paper that seems rather thorough on the subject here, but I'm have trouble understanding some of the math terminology with my lack of formal math training. Here are a list of things from section 2.2 in that paper that I don't understand.
T is a set of triangles; i is an index consisting of 3 nonnegative integers; r,s and t are vertices of the triangulation.In the first paragraph of section 2.2 it says "Let T = {(delta?)(i) = [r,s,t]  i = (i0,i1,i2) (thing that looks like an E) Z3+". I assume that r,s,t are the triangle vertices and that the index i is a number combo like 300, 030, 003 etc. If anyone can explain some of these symbols I would be grateful. I don't know what the vertical line means either.
The vertical bar inside the braces of a set definition, here and everywhere else, means "such that": T is the set of triangles such that their indices are three positive integers, abusing for a stealth definition what should be a notation for predicates.
Other vertical bars include projection onto some subspace (used along with the setdefinition vertical bar for Ax in section 2.1) and separation between the main function argument and "parameters" such as spline control points (used for M all over section 2.1).
No, the knots are points. For each vertex v in the triangulation, we choose n knots (one of which is v).After that there is a knot sequence, which I understand is what is called a knot vector elsewhere, and is just a sequence of increasing numbers like {0,0,1,1,2,2} etc.
Here the bars are a completely superfluous absolute value, and there is no "number sequence": V is the convex hull of n knots associated with the vertices of triangle i.Then it says we define a convex hull, and the beta symbol seems to be sort of like the index, I don't know what the 'absolute value' lines mean in this context but that symbol seems to have 3 components that add up to the 'order' of the triangle. I am unsure how the index and this beta symbol should be combined to get the desired number sequence.
M is the spline that has a 2D variable u (we are restricting ourselves to a surface, but similar definitions would hold for higherdimensional or lowerdimensional manifolds) and V as its set of n knots, adapted from section 2.1.Then it defines a multivariate simplex spline M(u  Vibeta). The u is a two component coordinate (u,v), but I don't know what the line means.
Actually, d is one of the few simple and commonplace definitions: the area of a triangle with the three given vertices. There are a factor of 2 and an absolute value as an artifact of practical computation (for 3D points computing the area becomes a matrix determinant).Then it defines the basis function with that line again, then a lower case d, with the triangle vertices without the indices but with the beta thingies in parenthesis, 'lined' against the M(u  Vibeta). What does that line mean anyway? The lower case d is also unexplained.
The sum is over all triangles and over all choices of beta for that triangle, i.e. over all basis functions N for the whole triangulation T. Indexing of the arbitrary control points p matches that of the N functions.Then we have the unweighted Bspline surface. The Sigma operator is something i always have trouble with, but I interpret this as the sum of every index combo multiplied by the point and the basis function and multiplied again with the sum of all the beta combos multiplied by the point and basis function. However, I do not understand what is meant exactly by Pi,beta. Pi would be P300, P030, P003 etc, but I don't know what the beta subscript does to that interpretation.
Yes, it's the usual weighting and normalization of any kind of NURBS.Finally, there are arbitrary weights that can be set, and once I understand the indexing system, I think I understand this part as a weighted mean of the above.
I've found a less general but vastly clearer basic explanation of triangular NURBS surfaces in http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.51.5361 and there should be other better references.If anyone can help me make sense of this I would be super grateful.
#5112430 Industrial revolution strategy (post mortem and ideas)
Posted by LorenzoGatti on 27 November 2013  06:03 AM
#5112414 Industrial revolution strategy (post mortem and ideas)
Posted by LorenzoGatti on 27 November 2013  05:03 AM
It doesn't matter, you are simply measuring mine output in coal units per turn rather than coal units per second.It's turn based strategy. There are no secondsThe easy way round this seems to be to vary the time it takes to produce a single resource. For example, if a fully staffed mine produces one unit of coal every 10 seconds, then an understaffed mine could produce only one unit of coal every 15 seconds.
The same 2/3 ratio between the production rate of a fully staffed mine and an understaffed mine can be realized as 1 coal every turn vs skipping production every third turn, 1 coal every 6 turns vs 1 coal every 9 turns, 15 coal per turn vs 10 coal per turn, etc.
#5112410 AMD's Mantle API
Posted by LorenzoGatti on 27 November 2013  04:51 AM
This kind of reasoning invites conspiracy theories. Maybe EA is so large and full of cash that their commitment to use Mantle is a ploy to pull competitors along with them into a technological and/or commercial dead end: the same number of wasted millions (the cost of developing and adopting a Mantlebased game engine) can be an acceptable "war expense" for a large company that's also pursuing other technology it actually stands behind, or a drain on the limited resources of a smaller company that needs to put too many eggs into one basket and a threat to their longterm survival.What EA does is relevant because they are a large, publiclytraded company whose livelihood hinges on the games they release and the technology used to make them. You may not like them, but you can be damn sure that they act according to what's in the best interest for them as a company. For them, an engineering decision of this level has the potential to cost 10's of millions of dollars (or more) over a few years time.
Just gratuitous speculation, of course. Personally, I view Mantle as an experiment in novel graphics API design and possibly as an architectural improvement for the actually important DirectX, OpenGL and OpenCL drivers; the parts that prove useful are going to become OpenGL extensions sufficiently fast.
#5111837 How to run Notepad++ script in CMD
Posted by LorenzoGatti on 25 November 2013  08:20 AM
powershellin a command prompt window.
#5111260 About fixed time step update catch up
Posted by LorenzoGatti on 22 November 2013  05:30 AM
This approach throws away deterministic simulation; in many game types the slightest variations in numerical values (unavoidable after a single increased timestep update, even with the best computation quality) can lead to large differences in game state later on.If its a single player game and its constantly very slow, I think the way out would be to switch down to a fixed number of less logical ticks with comparably bigger steps, when the game estimates it will not catch up. Though that would require the foresight to have the logic programmed for variable timesteps, even if in normal case on fast computer it would always do same fixed timestep.
#5110711 CCG patterns and antipatterns?
Posted by LorenzoGatti on 20 November 2013  02:59 AM
I hope I don't understand what you mean to do, because all I can see in asymmetrical and nontrivial starting conditions is a world of pain without discernible benefits.On that track, I do still think it holds true that in a battlefield/combat based game, a varied or dynamic start is something that can help balance certain deckandplay styles without affecting others that might be in less compromising positions. Altering the base stats of a certain commander (or granting indirect nerfs to certain cards in a commander's deck) as needed to ensure that the deck is still fun to play, without being overwhelming.
Apart from difficult selfinflicted balance problems (e.g. X units on the battlefield at the beginning are worth Y extra cards in the starting hand: find X and Y and ensure they are a balanced choice in all conditions), starting with something on the battlefield helps highly noninteractive rush strategies of various types: play a large horde and exploit numerical superiority to engage all enemy units allowing others to attack some objective undisturbed, play some kind of "artillery" and exploit long range attacks to exterminate arbitrary enemy units before they become a threat, play wizards and exploit early and excessive buffing to do something ordinarily impossible, and so on.
Can you give some examples of how varying setups can be an adaptation to the enemy Commander? What do you gain by letting players have their appropriate responses on the battlefield from the beginning instead of playing them gradually? Given a choice between deploying the specialized pieces of a rush attack or deploying things that are useful in a long game, what makes the latter more appealing? What makes adapting to the enemy Commander more useful than exploiting synergies with your own Commander?
#5110517 CCG patterns and antipatterns?
Posted by LorenzoGatti on 19 November 2013  11:41 AM
No, the effectiveness of "noninteractive" decks in Magic: the Gathering is a consequence of being able to win by directly messing with the opponent rather than by grinding through creatures and other permanents (as would be the case in any seriously battleoriented CCG).An Issue I have with MtG's 20life 7card start in eternal formats is that it doesn't encourage player interaction. It's not as much of an issue in the everexpensive T2 format, but if you look at even modern decks with great winrates (zoo, UW Control, RDW) you begin to see a pattern  none of the decks actually care about what your opponent does.
The less they care about their opponent's actions, the better chance they have of getting some wincon on the field. This is because, as you mentioned, each deck can be tailored to a specific goal: getting 20 damage out; dealing with 7+turns cards (no cards = no options); decking an opponent; gaining 40 life with a creature on the field.
Varied starting condition would only make some of the boring strategies more effective. More life? You can pay more life as a cost. More cards? You might be able to run the opponent out of cards, or to rush a lot of spells in unusually few turns. Free lands? Cards with higher casting costs become practical. Scrying or the like? Less copies of certain cards can be enough. Strategies would change a bit and remain equally aggressive.
In particular, suppose Magic: the Gathering rules were changed to begin the first turn with, say, 20 permanents on the battlefield: the game would become even less interactive, with an ample choice of disgustingly bulletproof overkill combos (likely guaranteeing victory for the starting player during the upkeep phase, without even attacking; figure out how, it's fun but off topic).
Decks that minimize player interaction severely limit the amount of fun your opponents get out of the game, and definitely detract from the social aspect. I'm hoping to mitigate this by using a dynamic battlefield, with win conditions you can affect without having direct counters for them. An example could be Dul'Nam, the Dark Lich, has a ritual that will turn all living creatures that die into undead under his control. His opponent could disrupt the Ritual with a fast harrying unit, or power through his losses and stab at Dul'Nam directly, forcing him to divert resources from the ritual into faster sorceries.This example is representative of critical aspects in which a battleoriented card game should do the opposite of a magic duel card game like M:tG. Major actions (like the necromantic ritual) take many turns (as opposed to be a single spell, ability or attack that must be dealt with immediately), and just about any unit can easily attack the Commander or troublesome targets in general (as opposed to the general inability of M:tG permanents to hurt each other).
There should be enough time to obtain more units after the ritual begins and get them to attack the necromancer before the ritual is completed (provided they fight their way beyond enemy lines).
#5110411 Create infinite curve
Posted by LorenzoGatti on 19 November 2013  03:46 AM
#5110406 Simple rotation question (hopefully)
Posted by LorenzoGatti on 19 November 2013  03:18 AM
No, it's just a vector pointing north that you want to use to find a plane and then compute projections and angles.The magnetic vector is effectively the sensor's own world axis.
If I understand correctly, you want a cartesian coordinate system tied to a certain point of the surface, in which axis z points "up" along the direction of gravity at that point (or more simply along the surface normal, treating Earth as a sphere).I need to be able to get the local yaw of the sensor regardless of its orientation. To do that I felt I needed to go into the sensor's local coordinate space but now I'm not so sure.
Choice of x and y axes in the tangent plane at that point has one degree of freedom, which can be used either to place axis y in the plane spanned by the z axis and the north vector (so that it points towards the magnetic north) or to place axis y along a geographical meridian (so that the projection of the magnetometer reading on the xy plane work like a compass).
All angles you mention are measured between the x,y or z axes and the north vector or its projections on the xy, yz or xz planes, all of which are easy to find.
#5110142 What can you do with a map (strategy)
Posted by LorenzoGatti on 18 November 2013  05:03 AM
A potentially grim setting: political parties, with leaders, elected officers and groups of activists and supporters as "units", electoral districts within one country as map sectors, player moves that don't include assassination or civil war (e.g. bribery, blackmail, aggressions, essays against leaders, public speeches and propaganda, lawmaking, terrorism against the masses) and relevant events (e.g. elections and important parliamentary votes).
A more lighthearted setting: tribes of clams colonizing some rocks, who try to persuade larvalstage mobile clams to join their tribe and settle on a certain rock, try to persuade "enemy" clams to leave rocks and go elsewhere by appropriately silly means like teambased insult duels, and win by "controlling" rocks.