random rule generation