We organize artifical intelligence contest where people can write ai for our game engine written in C# Windows Forms. Competitors write ai codes for our game and we insert this codes into our game manually but this requires effort and I think there is a way to let people insert their .cs files in runtime. How can we design this architecture please someone help us. Thanks in advance and sorry for my english.
Note: .cs files include artifical intelligence logic.
Maybe use the strategy pattern. Have the contestants implement an entry point via an interface. Your Game shell can then scan all assembly files in a given folder and find all types that implement the entry point interface.
Update:
To get you started I do a similar thing here (see method
ScanAssembliesForHostTypes): http://shuttle.codeplex.com/SourceControl/changeset/view/ba9750ca1f7a#Shuttle.Core%2fsource%2fShuttle.Core.Host%2fHostFactory.cs