• What Are You Working On? September 2015
    1,261 replies, posted
Google Docs also allows for PDF exportation too IIRC
[QUOTE=proboardslol;48616758]So are you saying that using this strToPtr function, putting in "ab" will get me a different int than "ba"? and if I put in "ab", it will return the same int every single time?[/QUOTE] Most of the time, yes. Collisions can occur sometimes, which means that: [code] //This will be true, if collision occurs strToPtr("randomString") == strToPotr("evenMoreRandomString") [/code] This is where it gets quite funky. That is why people implement lists or arrays at memory address. Like so: [IMG]http://i.stack.imgur.com/JGX80.png[/IMG] source link: [url]http://stackoverflow.com/questions/4980757/how-do-hashtables-deal-with-collisions[/url] Data retrieval: [code] //adding object, which has key "str" HashTable.add(string str, object obj) = Hash(str) -> locate memory address (bucket). If Null, create new List. -> List.add(Pair(str,obj)). //here is struct with key (str) and pointer to object. This struct is Pair. //retrieving object HashTable.get(string str) -> Hash(str) = locate memory address (bucket), which should point to List. If Null, throw exception or null. If not null, search in that List Pair, that has key str [/code] Something like this.
[QUOTE=Fourier;48616667]Hash functions job is to project elements from INFINITE space to FINITE (countable).[/QUOTE] More like finite to even more finite. Even if you ignore the memory limits and pretend things like BigNums are infinite, you'd still be hard pressed to find something that isn't countable.
Correct! Have a cookie.
Hey guys, need someone to point me on the right direction. I'm trying to make some kind of social artificial intelligence for a game character. Nothing too fancy, but had to include basic social interaction, emotion and self-preservation. Is there any good model for this?
[QUOTE=hakimhakim;48617863]Hey guys, need someone to point me on the right direction. I'm trying to make some kind of social artificial intelligence for a game character. Nothing too fancy, but had to include basic social interaction, emotion and self-preservation. Is there any good model for this?[/QUOTE] As someone who has tried numerous times to create programs capable of emulating the human mind and emotions, this interests me. I don't know of any good models for doing that sort of thing, though; I feel like the creation of artificial feelings borders on fringe science.
There's a lot of available AI that's optimized for certain purpose of games (fighting, shooting), and even social interactions (The Sim's), but I don't think I've seen much that combines social and self-preservation with free-will for decision making. I wouldn't try to emulate human social interaction too much (as advanced as The Sims), just the basic of it, to make it work with emotions/self preservation/free will.
[IMG]http://i.imgur.com/1WRnyJC.gif[/IMG] I worked too hard on this
Fortunately if the game ends up not working out now you can always re-purpose it into a lawn care simulator
[IMG]http://i.imgur.com/nPRn0i0.gif[/IMG] Lazar eyes dude. :freakout:
[QUOTE=FoohyAB;48619039]Made a custom audio component that automatically synchronizes the playing sound with the world time. Basically lets you ensure sounds will always play in sync: [vid]http://foohy.pixeltailgames.com/dev%20videos/behind%20the%20nerd.webm[/vid] [vid]http://foohy.pixeltailgames.com/dev%20videos/don't%20ban%20me%20robin%20walker.webm[/vid] I really wish unreal had more audio stuff available though :/[/QUOTE] crosspost from ue4 thread but I like it a lot SUE ME
I wrote a system that lets me write Haskell functions and compile them to JavaScript. The point is to write list transformations safely with awesome typechecking in Haskell, and then just get the equivalent code for JS. [code]sample1 ((c1, c2) :: (JArgs2 (JArray JNumber) (JArray JNumber))) = jmap (\(x, y) -> x + y) $ jzip c1 c2[/code] produces [code]function (arg0, arg1) { return map(function (arg2) { return (arg2[0] + arg2[1]); }, zip(arg0, arg1)); }[/code] Normal Haskell transformations are all fine. Like collapsing that lambda into. [code]sample2 ((c1, c2) :: (JArgs2 (JArray JNumber) (JArray JNumber))) = jmap (uncurry (+)) $ jzip c1 c2[/code] or even extracting the functionality into a separate function [code]jzipWith f c1 c2 = jmap (uncurry f) $ jzip c1 c2 sample3 ((c1, c2) :: (JArgs2 (JArray JNumber) (JArray JNumber))) = jzipWith (+) c1 c2[/code] These all get compiled to the same JS above. The neat thing here is that there's absolutely no source/AST processing being done here. Now, this could be done in something like C# with generics right up to the point where you wanted to include lambdas. The problem is that you somehow have to capture that name and I'm not sure you can do anything about that. What I like about Haskell is that this didn't subvert the type system at any point (like, for example, reflection would). I get identical guarantees that I would get anyways. The compiler will tell you if you try to add things that are not addable, or try to map a number. But it will also generalize as much as possible. The `zipWith` function above doesn't make any assumptions about what type of elements the `c1` and `c2` collections have, and it doesn't make any assumptions about what `f` should return. What do you think?
[QUOTE=FoohyAB;48619139]crosspost from ue4 thread but I like it a lot SUE ME[/QUOTE] What is the music? Is this something from Portal?
Wow, I honestly didn't think it would work this well [media]https://www.youtube.com/watch?v=IqEjZelz1jQ[/media]
[QUOTE=Darwin226;48619583]I wrote a system that lets me write Haskell functions and compile them to JavaScript. The point is to write list transformations safely with awesome typechecking in Haskell, and then just get the equivalent code for JS. [code]sample1 ((c1, c2) :: (JArgs2 (JArray JNumber) (JArray JNumber))) = jmap (\(x, y) -> x + y) $ jzip c1 c2[/code] produces [code]function (arg0, arg1) { return map(function (arg2) { return (arg2[0] + arg2[1]); }, zip(arg0, arg1)); }[/code] Normal Haskell transformations are all fine. Like collapsing that lambda into. [code]sample2 ((c1, c2) :: (JArgs2 (JArray JNumber) (JArray JNumber))) = jmap (uncurry (+)) $ jzip c1 c2[/code] or even extracting the functionality into a separate function [code]jzipWith f c1 c2 = jmap (uncurry f) $ jzip c1 c2 sample3 ((c1, c2) :: (JArgs2 (JArray JNumber) (JArray JNumber))) = jzipWith (+) c1 c2[/code] What do you think?[/QUOTE] Neat. It's time to do Google Code Translate.
[IMG]http://i.imgur.com/jSqNTQ3.gif[/IMG]
[img]http://i.imgur.com/RkALeh2.jpg[/img] Symmetric multiprocessing is a bitch.
[vid]http://files.1337upload.net/Desktop_09.05.2015_-_18.31.14.02.webmhd-d0db86.webm[/vid] spent a few hours getting lip sync working tldr everything is broken so im using hl2 faceposer (with a fixed phonemeextractor.dll) to extract the phonemes and portal2 faceposer to actually do shit [editline]5th September 2015[/editline] (his name is not really alex hartman)
eh it looks alright to me
I am working on [b]Sun simulator[/b]. [IMG]http://i.imgur.com/MNE8rRP.jpg[/IMG] Just 60 Watts of LED strip.
[QUOTE=FoohyAB;48619139]crosspost from ue4 thread but I like it a lot SUE ME[/QUOTE] This is awesome! Last time i posted how i loved the sounds of portal 2 because some objects emitted music i got dumb ratings for some reason. It seemed as if no one noticed that ingame and everyone thought i was trolling :wavey:
[QUOTE=Fourier;48619729]What is the music? Is this something from Portal?[/QUOTE] First is three different versions of "Behind the mask" by Yellow Magic Orchestra I somehow found and spliced to fit together nicely, and yeah second is portal 2 music :v: [editline]5th September 2015[/editline] [QUOTE=DrogenViech;48621437]This is awesome! Last time i posted how i loved the sounds of portal 2 because some objects emitted music i got dumb ratings for some reason. It seemed as if no one noticed that ingame and everyone thought i was trolling :wavey:[/QUOTE] I BELIEVE YOU seriously it's the coolest shit and I love it.
yeah a lot of the stuff in P2 emits music, the cubes especially. Also at certain heights too
[QUOTE=Rocket;48622396]And speeds I think. Going fast seems to make different music.[/QUOTE] I was going to mention that before I realized that thats likely part of the map itself.
[QUOTE=Darwin226;48617291]More like finite to even more finite. Even if you ignore the memory limits and pretend things like BigNums are infinite, you'd still be hard pressed to find something that isn't countable.[/QUOTE] What are you talking about? Most hash functions can theoretically hash a string of ANY length (i.e infinite) to something finite. Whether it's infinite in the physical reality of RAM is irrelevant, when talking about it from the CS perspective the purpose of a hash function is to often "squash" an infinite set into a countable one. Sure, some hash functions change a finite set into a smaller one, but most can work on an infinite set. Honestly you just seem to be trying to sound smart by pointlessly arguing...
[QUOTE=Tommyx50;48622717]What are you talking about? Most hash functions can theoretically hash a string of ANY length (i.e infinite) to something finite. Whether it's infinite in the physical reality of RAM is irrelevant, when talking about it from the CS perspective the purpose of a hash function is to often "squash" an infinite set into a countable one. Sure, some hash functions change a finite set into a smaller one, but most can work on an infinite set. Honestly you just seem to be trying to sound smart by pointlessly arguing...[/QUOTE] You cannot hash anything of infinite size (i.e. infinitely long string), your hash function would never return a result as it would be calculating forever.
[QUOTE=Tommyx50;48622717]What are you talking about? Most hash functions can theoretically hash a string of ANY length (i.e infinite) to something finite. Whether it's infinite in the physical reality of RAM is irrelevant, when talking about it from the CS perspective the purpose of a hash function is to often "squash" an infinite set into a countable one. Sure, some hash functions change a finite set into a smaller one, but most can work on an infinite set. [B]Honestly you just seem to be trying to sound smart by pointlessly arguing...[/B][/QUOTE] I think you're overreacting just a tad.
- i looked into networking and decided that it would take way too much time to properly implement a nice LAN fight/platformer game, so I'm sticking with local multiplayer instead. - added functionality for another player. i'm planning to have a max of 8 players. - added health bars - added gibs for death, blood coming soon. [vid]https://a.pomf.cat/fqcgjn.mp4[/vid]
Well, Tommyx50 and Darwin226 are both correct. Mathematically speaking, hash is infinite -> finite. But we live in real world with real constraints. Anyway, working on HTML backend for my Sun Simulator.
[QUOTE=Tommyx50;48622717]What are you talking about? Most hash functions can theoretically hash a string of ANY length (i.e infinite) to something finite. Whether it's infinite in the physical reality of RAM is irrelevant, when talking about it from the CS perspective the purpose of a hash function is to often "squash" an infinite set into a countable one. Sure, some hash functions change a finite set into a smaller one, but most can work on an infinite set. Honestly you just seem to be trying to sound smart by pointlessly arguing...[/QUOTE] A countable set is one which's cardinality is equal to the cardinality of some subset of natural numbers. My point was that any way you look at it, you're never squashing anything into something countable because finding a thing that isn't countable in the first place is a difficult task. Not to mention that "ANY length (i.e infinite)" is just wrong. A length is precisely what an infinite string doesn't have. There's a difference between arbitrarily large, and infinitely large.
Sorry, you need to Log In to post a reply to this thread.