It's possible to design a program that works like cells in a human body (or life)? [closed] - evolutionary-algorithm

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I always think that life in general is really very complex and we don't even know all about it. But it works, right? that lead me to think if it was possible to think of a program as thinking of a group of differentiated cells. or maybe totipotent (the ones that can differentiate in any other cell) cells that differentiated.
I don't know if this is the right place to ask because involves biology and reprogramming.
thanks for interest

If your question is as stated in the title the you ought to look into Artificial Life and Digital Life. The prime example of Digital Life is Avida, where you have a bunch of computer programs thought of as organisms who compete for computer resources (such as CPU time and memory). Another example is the research by Schlessinger et. al. (paper here). They created digital single-celled organisms that could aggregate into a multi-cellular organism. Furthermore, the cells in their research are differentiated in that not all of them can perform all actions.
Moreover, there is a fair amount of research on computer simulations of morphogenesis, embryogenesis, cell differentiation, cell division etc.

The established field of Genetic Algorithms might be worth exploring:
http://www.catonmat.net/blog/genetic-algorithms-101/
http://delicious.com/tag/geneticalgorithm

Your question is very vague. But you should consider to look in the field of Systems Biology. If you are interested I provide you an article by H. Kitano Systems biology: A brief overview
During my internship I have been simulating/modeling a very simple cell of a microorganisms to study its behavior. But from my understanding to simulate a cell of human body is extremely difficult to do not to speak of modeling an eukarotic cell...

Programs basically already work this way.
The linux fork() command - duplicate the current process, and starts running it from the the same point in both processes. The program "knows" if this program is the original or the forked one, and invokes a code with respect to it [if the programmer designed it to do it, of course]
Also note, that like cells - all linux processes have the same origin - there is one process which is responsible for creating all others.

Related

Linkers and Loaders for Objective-C [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I recently came across John Levine's book "Linkers and Loaders." This book was written in the year 2000. If anyone has read his book, is everything the author says still relevant for Objective-C in the year 2013? I am asking, because it looks like a good book to have on my shelf, but if the info is out of date I probably don't want to really study the book.
Thanks!
Yes & no...
I don't know that specific book, but if it was up-to-date in 2000 then the material in it should still be valid to learn about how things work under the hood.
However, you do not really need to know anything about linking and loading to understand variables and pointers.
Nor do you need to understand symbol tables as such. A symbol table is a data structure used by compilers to track variables during compilation as part of translating the program code your write into the instructions the CPU understands.
The concepts of variables and pointers in programming languages are abstractions of the concepts of memory locations and memory addresses at the CPU level (which themselves are in some sense abstractions of lower-level stuff, ending up with circuits and, if you dig deep enough, electrons! ;-))
What you should be looking for is a book on programming language concepts rather then compiling, linking and loading. A good book will introduce variables and types, then composites such as arrays and records, and end up with objects (which are essentially just variables you'll discover). Types and variables go together, one says how to interpret a collection of bits the other provides somewhere to keep collections of bits. A pointer is a value (collection of bits) of some pointer type, just as an integer is a value of some integer type.
Variables and pointers are not difficult concepts, but they are often misunderstood - plenty of questions on SO stem from misunderstandings of these concepts - so your quest is good, go and read! Apologies, but I've no reference to hand.
Given that ObjC has been in active use as a natively compiled language since the late '80s (prior, it was largely a precompiler generated language + runtime) and has supported linking/loading since then, too, it'll be as applicable as the book can be to any language derived from C. With that said, it is likely largely a waste of your time to dive too deep in that linking/loading are details that are taken care of by the system with little [OS X, OpenStep] to no [iOS] configurability to the developer.
Certainly, an interesting divergence, though, and a deep understanding of linking/loading is relevant to any work related to compilation and execution tool chains.

Need help manipulating a template (wave attack from Cartoonsmart) [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
First off, I have zero knowledge in programming... Just thought I would say that first before I get bombarded with jargon right out of the gate haha. I am an illustrator, motion graphics artist and animator trying to make their first game. This game has all the artwork covered... I plan on re-designing everything 100% to not appear to look like Cartoonsmarts on any level.
THAT BEING SAD... lol
If you are not familiar with this template you can see a little overview of the Wave Attack template I purchased at https://vimeo.com/34988233#at=1
What I need to do to it:
rotate the game to where the enemies come from the right and the player stays on the left. This means changing the menu to be landscape on top.
turn the "waves" into levels... I want to have 5 worlds with 4 levels for each world. I have 5 different backgrounds to show the world changes.
add a new set of enemies every world change. I have the sprites all covered for each world.
add a menu screen! haha the template does not include one and just jumps straight into the game.
lastly I need to divide the worlds with an image slideshow fading from image to image, about 2-3 images in an illustrated comic book explaining the transition to the next world.
If anyone knows how to do these things or help me in any way whatsoever please contact me on Skype (the25thPixel) I did not expect to budget for this thinking it would be easy lol but I am willing to pay someone for their help.
I am also willing to do a trade with some illustrations, graphics, or animations on any project someone may be working on. My site is 25thPixel.com ... please take a look and see that I plan on really showcasing my skills with a fun game that looks awesome.
I am always available and will be working on graphics in the mean time. I hope to hear from some of you soon... I was recommended to this site by the creator of the template thru his tutorial videos so hopefully this is the right place to post.
This isn't really a freelancing/hiring site, though as you're really only asking for help rather than a complete project it's probably okay. In terms of learning how to do what you outlined, be prepared to invest a little bit more time in the project. Some of the things you want to do, such as changing the orientation of the game and menu to landscape and adding a main menu, should be fairly simple, though they are difficult to explain in the limited space on this site. Following beginner tutorials on Cocos2d is your best bet in my opinion.
Some examples that should help:
Cocos2d - Setting Device/Screen Orientation
(Game orientation)
http://www.reigndesign.com/blog/creating-a-simple-menu-with-scene-transition-in-cocos2d/
(Main menu and different levels)
http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial
(Best resource for what you're looking for - should help you create multiple enemy types, and attain a basic understanding of the parts of your template)
Also, you probably already know that Google is your best friend. In case you're not sure what to look for though, a couple examples: (By the way, remember that your template is in Cocos2d and you should be looking for info on that in particular)
Scenes will allow you to create menus, "slideshow transitions" between worlds, etc. Very, very important.
CCSprite is what your ship and your enemies are most likely based on. Also used to add UI elements sometimes.
I hope you're able to accomplish what you're trying to do, and maybe gain some programming knowledge along the way. Also, excellent portfolio - you have some very impressive work.
Cheers,
XenElement

What design pattern(s) to use? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to design an easily extensible item system for my game where I don't need to modify existing code much. I want to add items with new effects on the fly.
Traits my items have in common:
A name,
a description,
an npc sell price,
if it can be equipped,
required level,
if it is usable in battle,
if it is usable outside of battle,
a cooldown
So I can encapsulate this already into a class. But now there are item effects.
Example:
heals x health points,
heals x mana points,
removes debuff x,
adds buff x,
gives x stat points on equipping,
has x% chance to create some other effect when equipped,
etc.
And those can be combined like: heals x health and mana points. The first four are examples for effects a usable item can have while the last two are examples for effects equipable items can have.
The idea behind it is that I have this structure in a database as well and I can add a new item with a new effect combination in my database, my code reads this then and builds it together into a new fancy item, without me having to modify much. The only time I need to modify my code is when I add new effects obviously.
How would you put this together in design pattern(s)?
I thought of decorator. Is there a different, better design pattern for this or maybe even a combination of multiple design patterns?
It seems a decorator pattern is good for your needs. Think of a pizza with different tops. You can warp the basic pizza with many tops and at the end you call a function to sum the prize or whatever. It's a kind of wrapper and you pass the object to the next class. Hence you need only a basic class and can add new (top)-class when you need it.
You can use Decorator Pattern to decorate your objects with additional functionality without modifying them.
This isn't a direct answer to your question, though I believe it needs more words than can fit into a comment:
Picking a design pattern for a chunk of code is not something which you would typically do up-front (If you do it this way, be prepared to change it after you've seen it working); it's something which you're more likely to do after you already have some working code in-place and are looking to refactor it. - Chances are that whatever decisions you make now will be affected by many (currently) unknown factors once you've started writing code.
I'd suggest thinking more about the features, behaviour and functionality which you'd like to create, and then just begin writing code to see what works and further develop your ideas. Trying to solve a problem by designing it up-front around buzzwords like "factory", "decorator", "visitor" etc most likely won't lead you to a solution - design is very much an iterative process of continual improvement, change and refinement.
As an aside, and specifically on OO design, have a careful think about the SOLID principles while you're writing code; they should help you make decisions when you come to refactoring
http://www.blackwasp.co.uk/SOLIDPrinciples.aspx
http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

Why do IDEs have Projects? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Why do IDEs structure code as "Projects" or "Solutions"? And no, I'm not trying to troll, I really want to know what people use them for.
It always seems to me like "Project" is just a redundant alias for "executable", and I find the "Project" structure tends to get in my way when I want to share code across several executable processes. This is especially true in languages like Java, where there's already a rigorous packaging system for organizing code with, but it applies to pretty much every IDE I've seen. So why do they always adopt this structure? Is there some trick to using it?
It always seems to me like "Project" is just a redundant alias for "executable",
I actually tend to think of "project" more as a "compilation unit" or a "deployment item" - at least for most compiled languages. Projects typically map to a single executable or library (or other compilation unit in languages where that's supported).
As such, a "project" is a very valuable method of organization.
Not all IDEs use these names, but in general, they are a way to organize code.
This is needed in any code base of a certain size - some sort of hierarchy that helps and logically separate code components from each other.
A solution can contain multiple projects. This concept is very much useful when you have a tiered software achitecture.
e.g. A solution can have following projects:
Data Access Layer Project
Business Layer Project
Presentation Layer Project
Every Project (tier) has a specific purpose in the same website.

Is it possible to make an Iphone app with 0 experience? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I would like to start building apps starting off with a small one. Is this even possible or d I have to learn code from going to school or get training?
Programming an iPhone App has nothing to do with rocket science at all, but there are some drawbacks to it:
You will have to use Objective-C as a programming language, which has quite a steep learning curve.
Albeit a lot of books being around on the topic of iPhone/iOS programming, I still have to see one written particularly for people new to programming in general. Same goes for the tutorials. Once you've written your first classic "Hello, world" programme, things will start to become difficult.
XCode (the development environment most people use) has a lot of stuff going on, which might seem to be a bit obscure at first sight (things like plist and their usage, the whole Interface Builder thing etc. come to mind).
As ChristopheD mentioned: Objective-C isn't one of the most forgiving programming languages at all (pure C isn't either, so why should its superset be?) and I can entirely second cdhowies advice to learn a more beginner friendly programming language (Java, for instance) first.
Whatever your decision will be: welcome to a really fascinating world!
It's absolutely possible, as others have noted, It will indeed take a lot of determination and effort.
Programming is a learnable skill like most others, but like any skill that pays well, it's not something you pick up over a weekend, or a week, or month. To create your first iPhone app of any real complexity if you've not programmed before -- and even simple apps are usually much more complex behind the scenes than they seem -- it's going to take months at least.
I encourage you to go for it, though, if you're willing to put in the effort. Start by learning to program in general; if you start with Objective-C and Cocoa Touch and the Xcode IDE (integrated development environment), it's likely to be overwhelming. Head First Programming is quite good, my girlfriend learned the basics of programming with it in just a few months of spare time, and it was clear from her questions that she really was learning the essential concepts. You'll be learning Python, which isn't like C or Objective-C in syntax or structure, but 95%+ of what you learn will transfer.
Next I suggest plowing into Objective-C. There are several good books out there; the one that I particularly liked escapes my mind at the moment, but some Amazon reviews will be able to guide you to a good choice. While learning the language there will likely be a few concepts you're missing that will require further investigation on your part, some object-oriented programming basics for instance, but you can likely fill the gap with some online resources.
After that go for iPhone programming with a book like Head First iPhone Programming (I have nothing o do with either book, btw); I've seen two people learn from it quite successfully. With most of that book under your belt you'll be able to write a variety of basic apps.
Importantly, with the experience of three books along those lines you'll be at a point where you'll be able to ask questions here at Stack Overflow in a clear enough manner that you'll get useful answers. If you start asking iPhone programming questions right away, odds are you won't be asking something that can really be answered, and even if so, the answers won't necessarily make sense to you.
Like I said at the start, it will likely be months before you're able to build something you're satisfied with, and it could be many months if you can only do it in your spare time, but it's definitely doable.
Lastly, understand that a crash course like this won't make you a good programmer, and won't give you the skills to write complex apps: only experience can do that. Keep programming, read online tutorials and blogs, and answer questions here on SO that you're qualified for (something that teaches you a lot, btw). Within a few years you may well qualify as good, and be on your way to great.
Yes it is possible, and you do not have to go to school.
Programming is not for genius people.
http://developer.apple.com/devcenter/ios/index.action
Go for it.